Donald Trump says he told his Secretary of State that negotiating with North Korean leader Kim Jong Un was a waste of time.
Rex Tillerson, America's top diplomat, disclosed at the weekend the US was in "direct contact" with Pyongyang over its nuclear and missile programmes.
The State Department said North Korea had shown no interest in dialogue.
"I told Rex Tillerson, our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man," President Trump wrote on Twitter.
"Save your energy Rex, we'll do what has to be done!" he added.
Mr Trump later vowed he "would not fail" on North Korea.
He wrote on Twitter: "Being nice to Rocket Man hasn't worked in 25 years, why would it work now? Clinton failed, Bush failed, and Obama failed. I won't fail."
Mr Tillerson's comments marked the first confirmation that backchannel discussions have been taking place as North Korea's nuclear tests and a war of words between the two leaders sparked fears of a military conflict.
He was speaking in China, where he is hoping to encourage President Xi Jinping to implement recently agreed UN sanctions against North Korea.