After 27 years in the FBI, John E. McHale was embarking on an easy retirement of sitting home and reading books. "I was just lying around the house raking leaves and enjoying life," he said. Then, last year, Prince George's County Executive Lawrence Hogan asked him to come work for the county.

As Hogan's liaison for public safety, McHale soon decided that he wanted to reenter the world of law enforcement. Late yesterday he got his wish, when the County Council, by a 9-to-1 vote, confirmed him for the $40,000-a-year job of chief of police.

"I'm just glad it's over," said McHale, the short, bespectacled former G-man. He seemed on the verge of joyful tears, and there had been worse days for Hogan, too, whose greatest political battles since becoming county executive seemed finally won.

McHale has been viewed by some council members as what one called "a political hack" for Hogan. Some rank-and-file police officers disparaged him behind his back, calling him "the roach."

But McHale -- who headed the FBI's organized crime unit for 16 years and claims to have put 14 "Mafia chieftains" behind bars -- gripped the lectern confidently yesterday as he answered the questions being posed at his confirmation hearing.

"Prince George's County," remarked one former FBI agent who worked with McHale, "is going to be small potatoes compared to the Mafia."

While at the FBI, McHale became known as a "walking encyclopedia" on organized crime. He prepared volumes of information on the subject which became requiured reading at the bureau. A former newspaperman, he wrote a periodic newsletter that was sent to agents to keep them abreast of the latest crime-fighting techniques.

"He was one of the most knowledgeable men in the country on organized crime," said Thomas J. Emery, the bureau's top agent in New Jersey until he retired recently.

"He had an unusual ability of correlation and association of events. He was invaluable in tying together seemingly unimportant incidents and lending an overall importance to the whole mosaic picture," Emery said.

McHale's detractors say his FBI job was primarily bureaucratic. He concedes he was not "in the woods digging up [Jimmy] Hoffa's body" but says that every single major organized crime investigation came under his supervision. "I'm proud that we put 14 Mafia bosses in the pen while I was there," he said. "Considering there are 27 so-called families in the country, that's not a bad average."

McHale, 54, claims he played no part in the FBI investigations of antiwar activists or Martin Luther King, but he defends the agency's actions.

"There were some very violent acts going on during that period," he said.

"They put a bomb in the Capitol. [The FBI's] acts were illegal, but you've got to equate them with the acts of violence. Weighing them, I cannot see them as disproportionate."

McHale started as a field agent in San Francisco in 1952, where he met another agent named Lawrence Hogan. In 1958, he was transferred to Washington headquarters. The investigations he supervised, according to McHale, included the Jimmy Hoffa investigation, and the investigation of the International Longshoremen's Association.

"Back in those days," said special agent Ed Sharpe, of the FBI's Brooklyn-Queens office, "when Jack was given the organized crime assignment, he didn't envision to what extent it would go."

McHale says that when the FBI first investigated organized crime it knew nothing about the subject. The big break, he said, was an electronic surveillance placed in the office of one "crime boss" in New York State. "We had a bug in his office," McHale said. "And we hear an underling say 'hey boss, tell us about the old days.' For two hours we got a history of the Mafia. You can't buy that kind of information."

McHale refuses to discuss his role in an investigation that he considers his most exciting experience at the FBI. Sources said that former Attorney General Edward Levi requested that McHale undertake a secret mission about four years ago.It was McHale's only undercover work. Because the investigation is still open, McHale said he will not discuss his role but admits "it is my only interesting story."

At yesterday's confirmation hearing, McHale rebutted council members' arguments that he needed local police experience to command the department. "I'm not out directing traffic at Pennsylvania Avenue and Silverhill Road," he said.

McHale took a strong position against police brutality and said, "It's an evil and if I catch an officer guilty of brutality, I'll punish him severely."

When he was asked about affirmative action in the police department, McHale replied that "certainly, we need more minorities. The police department is only 10 percent black at a time when the county is 30 percent black. That does not reflect the county. We are . . . trying to catch up."

One of McHale's projects after he retired was writing the biography of Dr. Samuel Mudd, who spent four years in prison after he treated John Wilkes Booth after the assassination of Abraham Lincoln.

McHale's father-in-law had led a successful campaign to clear Mudd's name and, according to McHale, they received a letter from President Carter."The president said he didn't think he could exonerate a dead man," McHale said, "but after due consideration it was his belief that Dr. Mudd was innocent."

The Mudd manuscript is currently being examined by a Connecticut publisher.

After failing to get his first choice for the chief's job, James Taylor of Petersburg, Va., confirmed by the council in December, Hogan changed his strategy for McHale.

According to informed sources, McHale told Hogan that he wanted to go out and meet community groups before the confirmation hearings, as Taylor had done. Hogan advised McHale to stay put and keep quiet until he got confirmed.

"Now," said McHale, "my job is to convince the whole community they will get equal law enforcement."