Mr Trump's comments come amid a ratcheting up the rhetoric over the death of an American student who had been detained by Pyongyang.
Trump had held high hopes for greater cooperation from China to exert influence over North Korea, leaning heavily on Chinese President Xi Jinping for his assistance.
The two leaders had a high-profile summit in Florida in April and Trump has frequently praised Xi and resisted criticising Chinese trade practices.
"While I greatly appreciate the efforts of President Xi & China to help with North Korea, it has not worked out. At least I know China tried!" Trump wrote in a tweet on Tuesday.
It was unclear whether his remark represented a significant shift in his thinking in the US struggle to stop North Korea's nuclear program and its test launching of missiles or a change in US policy toward China.
But it was likely to increase pressure on Beijing ahead of a US-China Diplomatic and Security Dialogue on Wednesday.
The talks will pair US Secretary of State Rex Tillerson and Defense Secretary James Mattis with China's top diplomat, State Councilor Yang Jiechi, and General Fang Fenghui, chief of state of the People's Liberation Army.
The State Department says the dialogue will focus on ways to increase pressure on North Korea to give up its nuclear and missile programs, but also cover such areas as counter-terrorism and territorial rivalries in the strategic South China Sea.
In a sign that US-Chinese relations remain stable, a White House aide said Trump's daughter Ivanka Trump and her husband, White House senior adviser Jared Kushner, were invited by the Beijing government to visit China later this year.
Mr Trump also described the treatment of US student Otto Warmbier by North Korea as a disgrace.
In a White House meeting with visiting Ukraine President Petro Poroshenko, Trump criticised the way Warmbier's case was handled in the year since his arrest, appearing to assail both North Korea and his predecessor, US President Barack Obama.
"What happened to Otto is a disgrace. And I spoke with his family. His family is incredible ... but he should have been brought home a long time ago," Trump said.
A senior administration official, speaking on condition of anonymity, said the United States had limited options to rein in North Korea without Chinese assistance.
White House spokesman Sean Spicer said a meeting between Trump and North Korean leader Kim Jong Un is less likely following Warmbier's death.
Spicer said Trump would be willing to meet Kim under the right conditions, but that, "clearly we're moving further away, not closer to those conditions".