A federal judge refused yesterday to throw out the prison sentence he had imposed on the former chief of staff at the Department of Health and Human Services, and attacked efforts to root out corruption in the department as "somewhat shallow."

The ruling, by U.S. District Court Judge Gerhard A. Gesell, means that C. McClain Haddow, the top aide to former HHS Secretary Marget M. Heckler, will have to pay a $15,000 fine and report to a federal prison in Petersburg, Va., to begin serving a one-year term for violating federal conflict-of-interest laws. The judge had said previously that Haddow will probably have to serve no more than 90 days.

Haddow, 37, who had sought to overturn his guilty plea and sentence, angrily denounced the ruling outside the courtroom and said he hopes to appeal the sentence.

Prosecutor G. Allen Carver Jr. "wants my hide up there on the wall and he got it," said Haddow. Carver, a lawyer in the Justice Department's Public Integrity Section, had argued that Haddow should serve a prison sentence.

Gesell had stayed imposition of the sentence in early October after he received in the mail a copy of what was purported to be a memorandum Heckler had signed for Haddow Jan. 25, 1985, giving him a waiver from conflict of interest rules for work he and his wife did with a foundation that used a teddy bear character to promote good health among children.

Lawyers said handwriting experts were unable to verify the signature, and Haddow claimed through his lawyers that he had pleaded guilty largely because he had been unable to find a signed copy of the memorandum.

But Gesell noted that by the date of the memorandum a payment from the foundation, which received federal support, had already gone to Haddow's wife. Even assuming the letter was valid, Gesell said it "has absolutely no retroactive effect."

In addition, Haddow also said he had arranged $25,330 in speech-writing contracts for two friends, who paid his wife $21,790 to do the work.

The judge said he would not have imposed the jail sentence except that he believed strongly that "breaches of the public trust cannot be tolerated." Haddow knew what he was doing when he entered his guilty plea, the judge said.

Moreover, Gesell said that Haddow knew someone had been "pilfering and destroying" documents in HHS's conflict of interest files, that he had enemies in the department, and that Heckler, now U.S. ambassador to Ireland, was "a vacillating and uncertain witness" as to whether she had signed the memorandum.