China may help curb North Korea's nuclear ambitions because they worry about losing a buffer state and because the Chinese fear Japan and South Korea might go nuclear in response. And China may hope to get trade benefits with America in an age of economic uncertainty in China.
But don't be confused that the Chinese are our friend:
China demanded Seoul remove the U.S. missile defense system THAAD on Wednesday, after the U.S. military moved missiles and road-mobile launchers to a designated site in central South Korea overnight.
Beijing's foreign ministry spokesman Geng Shuang condemned THAAD deployment during a regular press briefing and said the move "destroys the regional strategic balance and further prompts tensions on the Korean peninsula," South Korean television network SBS reported.
To be clear, China wants South Korea to remain vulnerable to being struck by (or least blackmailed by) Chinese nuclear missiles.
China may be the best hope of avoiding either a war to stop North Korea from going nuclear or accepting a nuclear North Korea, but that doesn't mean China will accept that mission.
Stratfor has more on the issue of relying on China.