Hillary Clinton accused China of "trying to hack into everything that doesn't move in America" and stealing government information, in strongly worded comments likely to irk Beijing.
Clinton, a former secretary of state who is making another tilt at the White House in 2016, pulled no punches in remarks to Democratic supporters at a campaign event in New Hampshire on Saturday.
James Clapper, the US director of national intelligence, said last month that China was the "leading suspect" in a massive breach affecting personal data of millions of US government employees.
Beijing dismissed the charge as "absurd logic."
Clinton, the current frontrunner for the Democratic presidential nomination, said: "They're trying to hack into everything that doesn't move in America... stealing huge amounts of government information all looking for an advantage.
"Make no mistake, they know they're in competition -- and they're gonna do everything they can to win."
The US has in recent years blamed several hacks on Beijing, including some it says were carried out by members of the Chinese military.
Cybersecurity specialists say the breach of data on at least four million current and former US federal employees appeared to be part of a Chinese effort to build a database for espionage.
At the same event, Clinton said that engagement was the best option when it comes to confronting Russian President Vladimir Putin.
"We have to be much smarter in how we deal with Putin and how we deal with his ambitions," she said.
"I've dealt with him. I know him. He's not an easy man.
"But I don't think there is any substitute other than constant engagement."
Relations between Moscow and Washington are at their lowest ebb since the Cold War over Russia's actions in neighboring Ukraine. Moscow denies backing pro-Russian rebels in the east of the country.
Despite the tense ties, Putin sent a message earlier to US counterpart Barack Obama to mark Independence Day in the United States, saying that relations between Moscow and Washington were key to ensuring global stability, and calling for dialogue based on "equality and respect."
Clinton also touched on Iran, which is thrashing out the fine details of a deal with world powers over its nuclear ambitions.
She warned, however, that even if an accord is sealed, "Iran's aggressiveness will not end."
"They will continue to be the principle state sponsor of terrorism," Clinton said.
"They will continue to destabilize governments in the region and beyond.
"They will continue to use their proxies like Hezbollah. And they will continue to be an existential threat to Israel."