The government's No. 2 personnel official is leaving the Office of Personnel Management after 16 months to work for a nonprofit defense group, an OPM spokesman said yesterday.

James E. Colvard, the deputy director of OPM and the former director of civilian personnel policy for the Navy, told officials this week he was leaving the government Jan. 4 to work for one of several nonprofit groups that have worked to recruit him.

OPM Director Constance Horner delegated much of the management of the agency to Colvard, a lifelong civil servant until his appointment as deputy director of OPM in 1986.

He will be replaced by Hugh Hewitt, OPM's general counsel.

Colvard's resignation, part of an exodus of high-level federal officials as the Reagan administration enters its final year, surprised many of the OPM career staff.

Colvard expressed regret at leaving OPM, but said it was "time to pursue other things." He said he considering several offers but did not name the organizations.

Colvard had pressed hard for the Civil Service Simplification Act, a bill that would replaced the traditional General Schedule and its 18 grades and 10 steps with broad "pay bands" that would give managers more flexibility in setting starting salaries and handing out raises. The bill is stalled in Congress.

As an alternative, he pushed for "deregulating" managers as much as possible within the constraints of the federal personnel law.

Colvard succeeded Loretta Cornelius, whose disputes with Horner's predecessor, Donald Devine, eventually led to Devine's withdrawal of his name for reconfirmation.

Colvard has twice received the Presidential Rank Award for Distinguished Executives.

Meanwhile, the Senate Labor Committee approved unanimously yesterday the nomination of Ann Dore McLaughlin to be secretary of labor, succeeding William E. Brock III. The nomination now goes to the floor, where a vote is expected before the Christmas recess.