The 30-year-old is understood to have signed a three-year contract on weekly wages around £280,000 per week.
It comes less than six months after he signed a new contract with West Ham for £120,000 per week adding a further 12 months to his deal. At that point, West Ham had rejected a €40m (£36m) bid from another Chinese club for their bad boy.
Stoke City are likely to see little of the transfer fee as the 20% sell on clause was based on profits on the £20m paid to them in 2017.
Arnautovic leaves having scoring 22 goals from 65 games.
Both West Ham United and Shanghai SPIG are expected to make official announcements soon.