SAN FRANCISCO—China has violated an accord it signed with the U.S. three years ago pledging not to engage in hacking for the purpose of economic espionage, a senior U.S. intelligence official said Thursday.

The 2015 bilateral agreement had significantly reduced the amount of Chinese cybertheft targeting American companies, but Beijing’s commitment to the deal has eroded, said Rob Joyce, senior adviser for cybersecurity strategy at the National Security Agency.

“It is clear they are well beyond the bounds of the agreement today that was forged between our two countries,” Mr. Joyce said during a panel conversation at the Aspen Cyber Summit.

Mr. Joyce’s comments were the latest—and most emphatic—sign of Washington’s rising frustration over China’s alleged violation of the pact signed between then-President Barack Obama and Chinese President Xi Jinping.

Last week, then-Attorney General Jeff Sessions also said China wasn’t adhering to the deal, in which the U.S. and China agreed not to conduct cyber operations against each other to steal intellectual property or other forms of economic intelligence.

China has repeatedly denied allegations of hacking American businesses.

Several private-sector cybersecurity firms have concluded that Beijing has been in violation of that deal roughly since Mr. Trump took office nearly two years ago. Trade hostilities between the two countries have grown during that period.

Mr. Joyce praised the Obama-Xi accord, saying that it had a marked impact on China’s economic hacking for a time. Some security experts have said they believe independent factors, including a reorganization of China’s People’s Liberation Army, may have had more to do with the temporary decline in cybertheft.

The Justice Department has prioritized combating Chinese national- and economic-security threats during the Trump administration. Last week, Mr. Sessions announced a wide-ranging “China initiative” to better combat theft of trade secrets, bribery, illegal foreign lobbying and business deals that could give foreign investors access to critical U.S. technology.

On Thursday, John Demers, who heads the Justice Department’s national security division, said he had no reason to believe the China initiative would be affected by the resignation of Mr. Sessions Wednesday at President Trump’s behest.

Federal prosecutors in recent months have unsealed several charges against Chinese intelligence officers accused of stealing information from American companies through cyberattacks and on-the-ground recruiting. Some government estimates have calculated the annual cost of Beijing’s alleged corporate raiding to the U.S. economy at hundreds of billions of dollars.

Write to Dustin Volz at dustin.volz@wsj.com