Shanghai offered Costa, 28, a £3million fee to agree to sign for them until November – and a £10m bonus if they won the Chinese Super League.
They also would have paid the wages he received from Chelsea, along with a £100,000-a-week top-up – which would have taken his wages to £285k-a-week.
However, Costa was adamant that he did not want to play in China with the Spain international having his heart set on a return to Atletico Madrid.
The hitman is prepared to sit out the first half of the season until it was possible for the La Liga side to sign him after their transfer ban expires.
A source in China said: “Shanghai thought they had reached an agreement but were then told that Costa had decided he didn't want to come.
“It is surprising because he would have been able to stay fit, play games and be in the best condition for January if he were to go to Atletico Madrid."