Researchers of Chinese descent make up nearly half of the work force in American research laboratories, in part because American-born scientists are drawn to the private sector and less interested in academic careers, Dr. McKinney said. Among the 6,000 Chinese scientists who have received grants from the National Institutes of Health, around 180 are under investigation for possible violation of intellectual property law, he said.

Harvard University had sponsored Mr. Zheng’s visa starting on Sept. 4, 2018, according to Jason A. Newton, a spokesman for the university. The visa support ended when Mr. Zheng lost his job at Beth Israel Deaconess Medical Center, he said.

The hospital said in a statement that it was cooperating with the investigation. “Any efforts to compromise research undermine the hard work of our faculty and staff to advance patient care,” said Jennifer Kritz, the hospital’s director of communication.

A message left for Brendan O. Kelley, Mr. Zheng’s lawyer, was not returned.

Court records sketch out a cat-and-mouse game between Mr. Zheng and Kara Spice, the F.B.I. special agent assigned to the case. Customs and Border Protection agents had been warned that he was “a high risk for possibly exporting biological undeclared biological material,” and inspected his luggage in the airline’s bag room.

At first, Mr. Zheng deflected their interest in the 21 vials, telling the agents that they “were not important and had nothing to do with his research.” Then he offered another explanation, saying that they had been given to him by a friend and that he had no plans to do anything with them.

“Zheng could not explain why he was attempting to leave the United States with the vials concealed in a sock in his checked bag,” Ms. Spice’s statement says. Shortly thereafter, he confessed to stealing the material.

Mr. Zheng booked another flight to China the following day, but was detained by F.B.I. agents before he could board it, court documents say. Through a Mandarin interpreter, he waived his Miranda rights and told the agents he intended to use the samples for cancer research. At that point, he was arrested.