J. Hamilton Lambert, the acting county executive in Fairfax, yesterday officially declined a standing offer to take the job permanently, shocking many county officials.

Lambert withdrew himself from consideration for the $61,000-a-year post in a letter to the Board of Supervisors, saying that his decision "is based entirely on personal reasons" and had nothing to do with county residency requirements or questions of compatability with incoming supervisors.

The announcement left Fairfax officials with no candidates for the post, which has been vacant since November 1978.

"I was totally taken aback" by Lambert's decision, said supervisor-elect Sandra L. Duckworth (D-Mt. Vernon). "I had no idea."

She said most county officials had been privately optimistic as recently as yesterday morning that Lambert would accept the post, which they had planned to offer him officially next month.

Calling Lambert a "private person," Supervisor Martha V. Pennino (D-Centreville), who headed the board's county executive search committee, said she was forced to bring the letter before the board "with deep regret."

The board unanimously directed her committee to launch a nationwide search for a permanent county executive, but supervisors were not hopeful that the task would be completed quickly. "We've got some big shoes to fill," said Supervisor Audrey Moore (D-Annandale), noting that the county's last executive search, which resulted in the hiring of Leonard Whorton in 1976, took almost a year.

Lambert, who has worked for Fairfax County government for more than 20 years and is extremely popular among county employes declined to comment on his decison. Smiling, Lambert would only say, "It's a beautiful day."

Lambert, who twice refused the job in the past, had been expected to accept the latest offer after receiving assurances of support from new supervisors elected last month. The county's willingness to waive a residency requirement that would have forced Lambert to move from his lifetime Leesburg home also had been expected to be persuasive.

According to Pennino, Lambert has agreed to remain as acting executive until a permanent replacement is found. He has held the post since the resignation of Whorton, whose two-year tenure had been marked by repeated conflict with the board.

Lambert, 39, is expected to return eventually to his former position as deputy county executive. He has held the position of acting executive for a total of almost two years, first stepping into the post in January 1976 with the departure of Robert W. Wilson.

Joining the county government at the age of 18 as an assistant map draftsman, Lambert is believed to have held more jobs with the county than any other employe. He later served as a top assistant to former county executive George C. Kelly Jr., who has been credited with professionalizing the Fairfax management system.

Lambert, whose formal schooling ended when he graduated from Loudon County High School in 1959, is respected by his peers in area local governments. He heads a committee that recently drew up a complicated and controversial agreement on the District's Blue Plains sewage treatment plant.

Because Lambert is expected to remain to work under his successor, county observers say, selection of the next county executive is bound to be a sensitive procedure. "That would be an impossible position for the new executive to be in -- knowing that the fellow in the next chair knew where all the skeletons were hidden," said one official.

Fairfax's county executive operates much like a traditional city manager, taking charge of the day-to-day administration of the county bureaucracy and reporting to elected supervisors.