John C. Demers, the head of the Justice Department’s national security division, told NBC News on Monday night that the case “is a big deal when it’s understood in the broader context of all the Chinese espionage efforts that are targeting the U.S. right now — whether it’s U.S. business on the one hand, or the government and national security secrets, as in this case, on the other.”

American officials have often said that China is the chief perpetrator of economic espionage, and Russia of political and military data theft. But China is increasingly focusing on national security: Its hack of the Office of Personnel Management several years ago centered on obtaining the security-clearance data of more than 22 million Americans. That was considered one of the most successful intelligence-gathering cyberthefts in history.

The arrangement that led to Mr. Peng’s arrest was set up through a double agent, identified in the document only as “the source,” who the indictment said had been paid about $191,000 by the United States government through June. The source told the F.B.I. that he had gone to China and met with what the United States contends were three officers of the Ministry of State Security in March 2015.

In a scene that seemed worthy of a movie, a Chinese intelligence officer told the double agent to place stolen information on a digital card, the kind that would be put into a camera or a laptop computer, and put it “in a book, wrap it in a bag, mark the package to ‘Ed’ and leave it at the front desk of a hotel” in Newark, Calif. “Ed” was “reliable, had family in China and had business dealings” in China, the officer said, according to the indictment filed in the Northern District of California, and “did not know what he was doing.”

Mr. Peng was tracked by the F.B.I. picking up the package, the indictment said, and then was followed a few weeks later to San Francisco International Airport, and seen boarding a flight to Beijing. His phone calls in Beijing were also tracked, and the government alleges that Mr. Peng was later told to go to a hotel room, leave another secure digital card in a dresser and pick up a payment.