China killed or imprisoned several C.I.A. informants in the country starting in 2010, unraveling the agency’s source network in a devastating setback for the C.I.A.CreditCreditAndy Wong/Associated Press

WASHINGTON — A former C.I.A. officer suspected by investigators of helping China dismantle United States spying operations and identify informants has been arrested, the Justice Department said on Tuesday. The collapse of the spy network was one of the American government’s worst intelligence failures in recent years.

The arrest of the former officer, Jerry Chun Shing Lee, 53, capped an intense F.B.I. inquiry that began around 2012, two years after the C.I.A. began losing its informants in China. Investigators confronted an enduring mystery: How did the names of so many C.I.A. sources, among the agency’s most dearly held secrets, end up in Chinese hands?

Some intelligence officials believed that a mole inside the C.I.A. was exposing its roster of informants. Others thought that the Chinese government had hacked the C.I.A.’s covert communications used to talk to foreign sources of information.

Still other former intelligence officials have also argued that the spy network might have been crippled by a combination of both, as well as sloppy tradecraft by agency officers in China. The counterintelligence investigation into how the Chinese managed to hunt down American agents was a source of friction between the C.I.A. and F.B.I.

Mr. Lee, who left the C.I.A. in 2007, has been living in Hong Kong and working for a well-known auction house. He was apprehended at Kennedy Airport in New York on Monday and charged in federal court in Northern Virginia with the unlawful retention of national defense information.

He appeared in Brooklyn federal court on Tuesday and is being held there while awaiting transfer to Virginia. He does not have a lawyer, a Justice Department official said. The F.B.I. apparently learned that Mr. Lee was traveling to the United States and scrambled to charge him on Saturday.

Mr. Lee had previously traveled to the United States in 2012 to live with his family in Virginia. It was during that trip that F.B.I. agents searched his luggage during hotel stays in Hawaii and Virginia and found two small books with handwritten notes that contained classified information. He later made his way back to Hong Kong after being questioned by F.B.I. agents in 2013.

It is unclear why Mr. Lee decided to risk arrest by coming to the United States this month.

In the books the agents found, Mr. Lee had written down details about meetings between C.I.A. informants and undercover agents, as well as their real names and phone numbers, according to court papers. Prosecutors said that material in the books reflected the same information contained in classified cables that Mr. Lee had written while at the agency.

More than a dozen C.I.A. informants were killed or imprisoned by the Chinese government. The extent to which the informant network was unraveled, reported last year by The New York Times, was a devastating setback for the C.I.A.

Officials said the number of informants lost in China rivaled losses in the Soviet Union and Russia during the betrayals of both Aldrich Ames and Robert Hanssen, formerly of the C.I.A. and the F.B.I. They divulged intelligence operations to Moscow for years.

The C.I.A. declined to comment on Mr. Lee’s arrest.

According to court documents, Mr. Lee served in the United States Army from 1982 to 1986 and joined the C.I.A. in 1994 as a case officer. Former agency officials said he also served in China during his career. Those who knew him said he left the agency disgruntled after his career plateaued.

Prosecutors said that both before and after he and his family moved back to the United States in 2012, Mr. Lee met with former C.I.A. colleagues and other government employees.

As the agency began losing assets in China, it was not clear at first that the losses were systematic, but as the disappearances mounted, the American intelligence community eventually realized it had a major problem.

The case had frustrated counterintelligence officials in the F.B.I. and C.I.A. as they sought to determine how the Chinese had disrupted agency operations in the country.

The F.B.I. suspected an insider had revealed sensitive information to the Chinese government, a theory not initially embraced by the C.I.A. Mr. Lee eventually became a prime suspect in the hunt for a traitor.

Former intelligence officials said that the F.B.I. lured Mr. Lee back to the United States as part of a ruse and he was interviewed five times in May and June 2013. The authorities said he never disclosed the two books, described as an address book and a datebook, to investigators.

Formers officials said they were surprised that Mr. Lee came back to the United States in 2012, knowing he might be under F.B.I. suspicion. Details about the F.B.I. operation to lure him back were tightly held, but former intelligence officials said he returned with the promise of a possible contract with the C.I.A. Many former agency officers leave the agency and then return on contract. At some point after the F.B.I. interviewed him, Mr. Lee returned to Hong Kong.

Why the F.B.I. did not arrest Mr. Lee after originally finding the classified material in his notebooks remains unclear. The F.B.I. declined to comment.

Officials are concerned that Mr. Lee’s case and at least one other represent a troubling pattern of Chinese intelligence targeting former agency officials, an easier task than trying to recruit current C.I.A. operatives.

In June, a former C.I.A. officer was charged with providing classified information to China and making false statements. Prosecutors said that the former officer, Kevin Patrick Mallory, 60, of Leesburg, Va., had top-secret documents and incriminating messages on a communications device he brought back from Shanghai.

In March, prosecutors announced the arrest of a longtime State Department employee, Candace Marie Claiborne, accused of lying to investigators about her contacts with Chinese officials. According to the criminal complaint against Ms. Claiborne, who pleaded not guilty, Chinese agents wired cash into her bank account and lavished her with thousands of dollars in gifts.