The 32-year-old midfielder, who earned 57 caps with his country, initially signed with Bolton on leaving Liverpool but then had a change of heart.
He has now signed a 2-year deal with City, with the Blues agreeing to pay Bolton around £400,000 in compensation.
"I had agreed to join Bolton, but I quickly realised that going to them would not be the right move for me," Hamann told the City website. "I told Bolton my feelings immediately and they understood my decision.
"When I became aware of press reports suggesting that City were interested in me, I was excited at the prospect of joining this club and knew this is where I want to be. I am happy that the situation has been sorted quickly.
"I really enjoyed the seven years I had at Liverpool and I want to thank everyone connected to the club because they made me feel welcome from day one, but everything moves on and I am looking forward to the new challenge here at City," he added.
Hamann spent a year at Newcastle before joining Liverpool, and he was a team-mate of City boss Stuart Pearce at St James' Park.
"When I spoke with Stuart Pearce I immediately knew that City was the club for me. Mr Pearce is an ambitious manager, and this is an excellent club with a good squad of players," said Hamann.
"Everything here at City is geared for the club to make progress and I want to play my part in bringing success to this football club.
"There was always 100% commitment from him, even when he was 34 or so," added the former Bayern Munich man.
"He tried his best at every training session and tried to encourage other players. He's carried that over into management, he lives football and that's a good thing."