The 30-year-old - who signed a contract extension in January - told the London club last week he wanted to leave after renewed interest from China.
He has signed a deal reportedly worth £280,000 a week with manager Manuel Pellegrini wanting the Austrian to leave before he got in the way of pre-season preparations.
Premier League
Spurs 'call off pursuit' for Conte as new manager - reports
04/06/2021 AT 21:35
Arnautovic's signing sees Vitor Pereira’s side strengthen their attacking options with a little less than half of the Chinese league season remaining.
He joins former Chelsea midfielder Oscar and his fellow Brazilian Hulk in Shanghai and his arrival is expected to be followed by the departure of striker Elkeson, who has been heavily linked with a return to Guangzhou Evergrande.

Shanghai SIPG FC player Oscar

Image credit: Getty Images

SIPG are two points adrift of league leaders Beijing Guoan with 14 games of the domestic campaign remaining and are also due to play Japan's Urawa Red Diamonds in the quarter-finals of the Asian Champions League next month.
Arnautovic scored 22 goals in 65 appearances for the Hammers.
Additional reporting: Reuters
Premier League
Pogba: Beating Liverpool would put us on their level
15/01/2021 AT 09:52
Premier League
Best of 2020 - When you walk through a storm: why title really does mean more for Liverpool
26/06/2020 AT 10:36