The 19-year-old Chinese was only eighth best on season’s form going into the final.
Germany’s Julia Fischer, whose boyfriend David Storl won the shot put earlier in the week, failed to do the same, recording a best of 54.69m in the second round.
Croatia’s European and World youth silver medallist Sandra Perkovic took the bronze with 54.24m.
Anna Jelmini, the American who led the season’s rankings with 56.06m, could manage only 49.46 for seventh place.
Performances were generally down, with Shangxue, the only athlete to set a season’s best, saying the damp conditions did not help.
“The result was good, although it could have been better if it wasn’t so wet,” she said.
Paul Halford for the IAAF