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.