Good cop, bad cop. The “failure” of talks probably works out well for both. President Trump sends a strong message to China that “no deal” is always an option for him rather than accepting a bad deal. Kim gets to go back as the leader who didn’t cave to the big bad west - but then later on will deal with the “far more reasonable” SK government.
In the long run, China does not want to see a major failure or war in NK, since they would have to absorb a large number of NK refugees in such a case. China is probably also annoyed that NK does not modify it’s Communism so that they can have the relative economic success that China has achieved through change.