A former Food and Drug Administration chemist pleaded guilty Tuesday to insider trading for using confidential agency information to buy and sell stocks of drug manufacturers, the Justice Department said.

Between July 2006 and March 2011, Cheng Yi Liang bought and sold stock in more than 25 companies and reaped profits or avoided losses of $3.8 million, according to a recent court filing.

Liang, 57, also pleaded guilty to filing a false financial disclosure with the FDA. The government said he neglected to report “that during 2009, he earned approximately $1,040,000 from trading on FDA inside information in the pharmaceutical stock known as Vanda.” That information would have been important to the FDA in assessing whether Liang was engaging in “unethical conduct,” according to a statement of facts that Liang acknowledged.

The case against Liang, filed in March, vividly illustrated how federal employees often have access to sensitive market-moving information. Few in the government have been accused of trading stocks in violation of that trust, though many in the financial industry have been charged in a broad crackdown on insider trading.

“In a shocking abuse of trust, Mr. Liang exploited his position . . . to cash in, using the accounts of relatives and acquaintances to hide his illegal trading,” Assistant Attorney General Lanny A. Breuer said in a statement. “Now, like many others on Wall Street and elsewhere, he is facing the significant consequences of trading stocks on inside information.”

Liang, a Gaithersburg resident, worked in the FDA’s Office of New Drug Quality Assessment, where he tapped into a database that tracks drug safety issues and the progress of experimental drugs through the approval process, the government said.

In January, for example, Liang reviewed an internal memo concluding that the active ingredient in an antidepressant called Viibryd was safe and effective, the government said. Around the same time, using brokerage accounts in other people’s names, he bought shares of Clinical Data Inc., the maker of Viibryd. When news of the drug’s approval was reported, the stock price soared from $15.03 to $24.76. Liang later sold shares at a profit of $379,602, the government said in a court filing.

Under Liang’s plea agreement, the Justice Department supports a sentence of 57 to 87 months, but the court is not bound by that. The maximum prison sentence for the fraud count is 20 years; the maximum for the false statement charge is five years, the Justice Department said.

Liang is scheduled to be sentenced in January. He has agreed to give up his illegal profits, and he could also face millions of dollars in penalties.

The Securities and Exchange Commission, which filed parallel civil charges, said in an Oct. 7 court filing that Liang had reached “an agreement in principle” with the SEC staff to settle that case.

Last month, the government withdrew related criminal charges against Liang’s son Andrew Liang. Separately, Andrew Liang agreed to plead guilty to possession of child pornography, according to an August court filing.

An attorney for Andrew Liang declined to comment.

An attorney for Cheng Yi Liang did not respond to a message.

The FDA “has begun taking steps to prevent this type of activity from happening again,” spokeswoman Erica V. Jefferson said by e-mail.