Assistant Secretary of Housing and Urban Development Emanuel S. Savas resigned from the Reagan administration yesterday shortly before HUD Secretary Samuel R. Pierce Jr. said he would fire him for "abuse of office."

Savas was placed on paid leave in January after The Washington Post reported that several HUD employes helped type and proofread his privately published book, "Privatizing the Public Sector--How to Shrink Government."

After calling witnesses before a grand jury on the matter, the Justice Department declined to prosecute Savas but recommended in a strongly worded letter that he be disciplined.

In his letter of resignation, Savas said allegations about the book were "frivolous charges" and that Sen. Daniel Patrick Moynihan (D-N.Y.) and former secretary of state Henry A. Kissinger, among others, "could no doubt be accused of having done much the same thing" during their service in government. Savas said he felt free to return to the academic world because he had been "exonerated."

But Pierce said in a statement, "I had given Dr. Savas the opportunity to resign rather than be fired by 5 p.m. today. Instead, he took the opportunity to write this kind of foolish letter . . . .

"I am sorry that Dr. Savas abused the opportunity which I gave him by claiming complete exoneration. The allegations about him were not 'frivolous' . . . . The conclusion of the Justice Department is there was evidence of abuse of office."

HUD aides said Pierce also plans to seek compensation from Savas.

In a letter to HUD Inspector General Charles L. Dempsey, the chief of the Justice Department's Public Integrity Section, Gerald McDowell, said that while the matter did not meet the department's standards for a theft case its decision not to prosecute was "not because of any doubt that Savas abused his office and misused government resources by instructing his staff to help him in a private venture."

McDowell said HUD should consider action "to punish this conduct, to recover from Savas whatever unjust enrichment he received from the improper use of government supplies and personnel and to deter others from engaging in similar activities . . . ."

McDowell said Savas had made "contradictory statements" during the probe and had used HUD employes to help promote sales of the book.

The Post reported in January that two GS-12 HUD staff members, who earned about $29,000 a year, spent several days proofreading Savas' manuscript on government time, and that two HUD secretaries typed corrections during work hours. Joseph Esposito, a former assistant to Savas, said at the time that Savas had directed him to assign the HUD employes to work on the manuscript.

Savas said in a statement yesterday he now recalled some HUD employes did "negligible" work on his book. But he argued that it was "entirely appropriate" because "the book and its ideas contributed directly to the policies and work of HUD and the administration."

Savas, a leading advocate of cutting federal urban aid programs, previously said he was unaware of any such work being done on government time. But he continued to dispute Esposito's account, saying the proofreading work was assigned "without my knowledge or authorization."

Savas wrote the book for a nonprofit foundation, which has paid him royalties on sales of approximately 20,000 copies.

In response to Pierce's statement, Savas last night called the Justice probe a "runaway hunting expedition" that found "nothing illegal," and said the letter from McDowell "has numerous errors, omissions and distortions . . . ."

Savas dismissed the other allegations that were referred to Justice as "even more trivial insinuations, gossip and innuendoes."

One concerned a New York firm headed by a former colleague of Savas that paid him $33,000 in fees before he joined the government. The firm later was awarded a $495,000 HUD contract by a panel appointed by Savas.

Another concerned Savas' 20 government-paid trips over 10 months to New York, during which he spent each weekend at his home in New Jersey.