Nadal lost 6-3, 7-6 (7/3) in the second round to Viktor Troicki, his first-ever defeat to the Serb and just the latest setback for the fading Spanish great.
Chinese fans brandished pictures of Nadal - including one of him in his underwear - but some were left in tears as the 14-time Grand Slam champion was well beaten.
Afterwards Nadal, now 30 and with a catalogue of injuries to his name, vowed to return to top form by next season, mainly by putting the zip back in his forehand and movement.
"I know what I have to do and I'm going to do it," scowled Nadal, who has dropped to fifth in the world after a misfiring season. "I've got two-and-a-half months until next season so I have got two-and-a-half months to put myself at the level I want to be. And I'm confident I'm going to do it."
Earlier, Australia's Kyrgios lashed out at fans and insisted "I don't owe them anything" after he was booed off court in tempestuous scenes at Shanghai's Grandstand court.
The hot-headed world number 14 clashed with the chair umpire and a heckler and admitted not trying after he lost 6-3, 6-1 to German qualifier Mischa Zverev, the world number 110. Kyrgios was slapped with a code violation for an audible obscenity and was warned to play properly after he patted a child-like serve into his opponent's court.
Meanwhile, Stan Wawrinka had little trouble as the US Open champion mastered Britain's Kyle Edmund 6-3, 6-3 to reach the third round. Canada's Milos Raonic beat Paolo Lorenzi 6-2, 6-4, but Czech seventh seed Tomas Berdych tumbled 7-6 (7/4), 7-6 (7/1) to Marcel Granollers. David Goffin beat Benoit Paire 6-1, 7-6 (7/0) and Gilles Simon ended Chinese hopes when he beat wild-card Wu Di 6-2, 6-2.