The former Chelsea striker, 34, flies out to join his new team-mates in July.
He said: "I have considered all the offers I have received in the past few weeks, but feel that Shanghai Shenhua is the right move for me at this time."
The Ivory Coast forward's last act in a Chelsea shirt was scoring the winning penalty in their Champions League final defeat of Bayern Munich in May.
Drogba added: "I'm looking forward to a new challenge, to experiencing a new culture and excited about developments in the Chinese Super League.
"When Chelsea went to China last year, we had a great time and I met some amazing fans.
"I hope to help promote Chinese football around the world and further improve the links between China and Africa."
Shanghai Shenhua owner Zhu Jun said: "We have been wanting to sign Didier for a while and are very happy that it has finally happened.
"He is an incredible player, who has won so many trophies in his career. We feel that his experience and ability will be a very valuable asset to our squad.
"Shanghai is one of the most influential cities in the world and we are very excited to welcome Didier here."