Running in the outside lane, the 22-year-old came through to win in 10.04 seconds.
"When I saw the rain tonight I thought, "yes", said the British champion.
It was Prescod's first Diamond League triumph and the Briton said that while others toiled in the wet, he relished it.
All four of Lijiao's throws, each one of which surpassed 19m, would have been enough to win, as the best effort of Jamaica's second placed Danniel Thomas-Dodd was 18.70.
Defending world indoor champion Anita Marton failed to present her best and only settled for the sixth place at 18.16m.
De Grasse, from Markham, Ont., finished eighth in a time of 10.25, while defending world champion Justin Gatlin of the US finished seventh, in 10.20.
There were further home celebrations after the women's javelin, won by China's Huihui Lyu with a meeting record of 66.85m.
Marcelina Witek of Poland took the second place at 64.49m, followed by Eda Tugsuz of Turkey who finished 63.20m.
Lyu said: "It is a good performance, but I haven't reached my best, I hope that I can have a good condition in the Asian Games".
IAAF World Championship victor and Rio Olympic Games Long Jump hero Luvo Manyonga was the best of the South Africans on Saturday, winning the men's competition at the IAAF Diamond League Meeting in Shanghai, China.
"My expectations going in were that I knew I had it in me as long as I executed my race".
"Today's competition was good, but I meant to break 20m and it's a pity I didn't manage it", she said.
In the men's 110m hurdles, Jamaica's reigning world and Olympic champion Omar McLeod was left praying for victory on the finishing line before he could celebrate a third Shanghai win in a row.
Spain's Olympic silver medallist Orlando Ortega was second in 13.17, ahead of Russia's Sergey Shubenkov, starting the defence of his Diamond League title as an Authorised Neutral Athlete, who clocked 13.27.
McLeod joked: "Maybe the reason to claim the title is the food, I like the fried rice in Shanghai".
Xue Changrui disclosed he didn't expect his 5.71m, he said: "To be honest the result came as a little surprise, I had no confidence before the game".
Damar Forbes' 7.99m was a season best but he could only manage a sixth place finish in the long jump event, which was won by China's Shi Yuhao, 8.43m.
Shaunae Miller-Uibo sprinted to first place in the women's 200m in a time of 22.06 - a meeting record - ahead of Olympic champion Dafne Schippers (Netherlands, 22.34) and Jamaican Shericka Jackson (22.36).