Former Chelsea public housing chief Michael E. McLaughlin could face little, if any, prison time under Tuesday’s plea agreement with federal prosecutors, but he still faces possible criminal prosecution from state Attorney General Martha Coakley, who is conducting an energetic investigation into McLaughlin’s allegedly illegal political fund-raising.

McLaughlin pleaded guilty to four felony counts of concealing his inflated salary from federal officials. He has not yet negotiated a plea deal with state investigators that, like the federal deal, would require him to provide evidence against others. However, a person briefed on Coakley’s investigation said McLaughlin is already providing information about his relationship with his onetime ally, Lieutenant Governor Timothy P. Murray.

On Tuesday, McLaughlin admitted that for at least four years he intentionally understated his actual salary by about $140,000 annually out of fear that disclosure would trigger a federal investigation into his activities at the Chelsea Housing Authority, which provides housing for elderly and low income people.

His $360,000 salary was among the highest of any public housing official in the United States.

McLaughlin was subdued and slightly nervous as he appeared before US District Court Judge Douglas P. Woodlock. That was a marked change from his court appearance in November 2011, when he boasted about his salary, telling a Globe reporter he deserved every penny of his pay because he was a superstar among the nation’s housing directors. Asked directly why he understated his salary in official documents, McLaughlin smiled and answered, “That was the rebel in me.”

The Globe began investigating the 67-year-old McLaughlin in late 2011 as he prepared to file for a state pension, which at an estimated $278,000 a year would have been one of the largest in the state. As an admitted felon, McLaughlin now is at risk of losing his retirement income.

Meanwhile, the state grand jury, impaneled by Coakley, has been investigating McLaughlin’s fund-raising on behalf of Murray and other politicians. As a federal official, McLaughlin was prohibited from most political activity, but several Chelsea Housing Authority employees and politicians in the Merrimack Valley told the Globe they attended Murray fund-raisers that McLaughlin helped organize. Some said they donated cash, violating state campaign finance laws.

Murray’s connection to McLaughlin, one of his key supporters when Murray first ran for lieutenant governor in 2006, has seriously damaged his political career. Murray announced in January he will not run for governor in 2014 even though, with Governor Deval Patrick not seeking another term, he would have been considered a front-runner.

A key issue in Coakley’s investigation is whether politicians — including Murray — knew that McLaughlin was raising funds on their behalf.

At least one witness testified Murray was well aware that McLaughlin was doing extensive fund-raising for him, according to a person who spoke to the witness. However, Murray, who was questioned under oath about his ties to McLaughlin, has publicly denied knowing McLaughlin was fund-raising for him. The person who spoke to the witness asked to remain anonymous, because the testimony is not public.

“As the lieutenant governor has said before, Michael McLaughlin betrayed a lot of people, including him, and ­because of that, he and the admini­stration have tried to insti­tute reforms so that it doesn’t happen again,” said Scott Ferson, a campaign spokesman for Murray, last week. He declined to make an additional comment on Tuesday.

Assistant US Attorney S. Theodore Merritt told Woodlock the evidence would show that McLaughlin wanted to keep his salary from the US Department of Housing and Urban Development — which provided the bulk of the agency’s funding — and commented to others at the Chelsea housing agency that “it’s none of their business.”

Merritt said McLaughlin made around $77,000 when he took over the 900-unit authority in 2000. By 2011, his salary had reached $360,000, Merritt said, after years in which the housing authority’s board of commissioners gave McLaughlin’s contract “little, if any, review.”

Asked by Woodlock what McLaughlin’s motive was, Merritt said it was money. McLaughlin’s pay was fifth-highest in the country for housing chiefs, he said. The others in the top 5 included the housing heads in Los Angeles and Philadelphia, much larger cities than Chelsea, which has only 35,000 residents.

When HUD in 2011 required housing authorities nationwide to disclose the salaries of their five highest-paid employees, McLaughlin tried to persuade a trade group that represents executive directors from Massachusetts to file legal action to stop the policy.

Last week, the US Attorney’s office made public an eight-page plea agreement, which indicated McLaughlin first offered to cooperate on Nov. 15.

Under federal guidelines, if he does not adequately assist investigators, McLaughlin could be sentenced to 12 to 18 months in federal prison, with some portion of the time to be served in a halfway house or under house arrest.

Under the terms of the deal, if he provides “substantial assistance” to federal prosecutors, helping them “in the investigation or prosecution of another person who has committed a criminal offense,” McLaughlin could still do prison time, but it would be less than the guidelines of 12 to 18 months.

On the state side, McLaughlin would probably not face jail time even if he pleaded guilty to campaign finance or other violations. Although state campaign finance law does allow for jail time, violators generally pay fines to resolve their cases. However, former Middlesex County Register of Probate John Buonomo was sentenced to 2-1/2 years in jail in part for writing checks to himself out of his campaign account.

Woodlock made it clear that McLaughlin’s fate was far from certain despite the federal deal. Though the prosecutor will recommend a sentence, the judge has discretion to reject the recommendation. He could impose a sentence on each count up to 20 years in prison and a $250,000 fine.

“I am not bound by the plea agreement,” Woodlock said. “I am going to make my own decision.”

In addition, Woodlock said, the US Attorney’s office alone will determine whether McLaughlin meets the standard of substantial cooperation. McLaughlin will have no say in that determination.

Woodlock accepted McLaughlin’s plea and ordered him to surrender his passport and restrict his travel to New England. He scheduled sentencing for May 14.

The federal plea agreement does not describe the potential targets of the ongoing federal investigation, but investigators have been looking at a range of financial issues, including how the agency spent more than $7 million in federal grants that cannot be accounted for.

McLaughlin accepted that grant money with a commitment to use it to improve housing units, but the work was not done and much of the money was diverted to everyday expenses and salaries for McLaughlin and lieutenants.