North Korea has condemned US President Donald Trump for pulling out of the Paris climate agreement, describing the decision as "the height of egotism" and an example of the "moral vacuum" in the US leadership.

"Global warming is one of the gravest challenges that humankind is facing today", a Foreign Ministry spokesman told the state-run KCNA news agency on Tuesday.

"The 'America First Policy' advocated by Trump led to the withdrawal from the Paris Agreement", the official said.

"This is the height of egotism and [a] moral vacuum seeking only their own well-being, even at the cost of the entire planet".