Man City bolster defence with Boateng
"This is a very good signing for Manchester City and I am pleased to bring Jerome to the club," City manager Roberto Mancini told the club website.
"He is a young player who is already of a very high quality, but I think he can continue to improve at City."
The versatile 21-year-old, who can play at either centre-back or full back, is in Joachim Low's 23-man squad for the June 11-July 11 World Cup in South Africa.
"He can play a number of positions in defence, which is important. He has proved his ability in Germany and I think he can be a very important player," Mancini added.
Boateng, who is the younger brother of Portsmouth midfielder Kevin-Prince, has made 75 appearances for Hamburg and three for his country. He will formally become a City player from July 1.
The club did not give a transfer fee.