The attack is said to have hit more than 300,000 computers in 150 nations, causing billions of dollars of damage.
Thomas Bossert, an aide to US President Donald Trump, made the accusation in the Wall Street Journal newspaper.
It is the first time the US has blamed the country officially for the worm.
Mr Bossert, who advises the president on homeland security, said the allegation was “based on evidence” and said that the United Kingdom and computer firm Microsoft also blamed affiliates of the North Korean government for the attack.
In May, Windows computers hit by the cyber-attack had their contents locked, with users asked to a pay a ransom to have their data restored. EU police body Europol called the scale of the attack “unprecedented”.
He did not specify what action, if any, the US government planned to take in response to their findings.
The country is already facing major economic sanctions after being re-designated a state-sponsor of terrorism last month amid tension over the North Korean nuclear programme and missile tests.
“North Korea has acted especially badly, largely unchecked, for more than a decade, and its malicious behaviour is growing more egregious. WannaCry was indiscriminately reckless,” Mr Bossert wrote.
“As we make the internet safer, we will continue to hold accountable those who harm or threaten us, whether they act alone or on behalf of criminal organizations or hostile nations,” he went on.
“The tool kits of totalitarian regimes are too threatening to ignore.”
The White House is expected to give an official statement blaming Pyongyang on Tuesday. (Courtesy BBC)