President Barack Obama has raised continuing US concerns over China's cyber activities, as two days of talks between the two nations came to an end.
He urged China to act in order to reduce tensions, the White House said.
The US has in the past accused China of being involved in hacking government and commercial computer systems.
Earlier this month, the Chinese were blamed for a security breach involving the records of four million past and present US federal employees.
Speaking in Washington at the end of the talks, US Secretary of State John Kerry said the two countries would now work together to come up with a code of cyber conduct.
"There was an honest discussion, without accusations, without any finger-pointing, about the problem of cyber theft and whether or not it was sanctioned by government or whether it was hackers and individuals that the government has the ability to prosecute."
The US made it "crystal clear" that this was not acceptable, Mr Kerry added.
"We need to work through how all countries are going to behave, but particularly how we're going to work this out in terms of the bilateral relationship."
China has denied being behind the huge security breach at the US Office of Personnel Management (OPM) three weeks ago.
State Councillor Yang Jiechi said in Washington the US must "respect the facts".
He added that China was cracking down on hacking and was ready to co-operate with the US on cybersecurity issues.
Earlier in the year, China also denied accusations it was behind an attack that stole data from US health insurer Anthem.
The White House said President Obama also expressed concerns about the growing Chinese presence in the South China Sea.
But the two sides were keen to emphasise areas of agreement, including on ocean preservation, illegal fishing and climate change.