Sources told ESPN on Tuesday thatIbrahimovic was considering investingin the club and the deal has since been made official.
"Hammarby is a fantastic club with passionate supporters and has great respect in both Stockholm and Sweden," Ibrahimovic said.
"I have always liked the club and the fans. I am impressed with what the club has done in recent years, both on and off the pitch. Being able to join and develop Hammarby forward feels both fun and exciting."
The news has not gone down well at Malmo, the club where Ibrahimovic started his professional career in his home country. A statue of the striker outside Malmo's stadium was vandalised with a toilet seat and it has been reported that the club's fans have started a petition for the monument's removal.
The former Sweden internationalannounced earlier this month that he was leaving LA Galaxy after two years in Major League Soccer.
In October, he teased fans with a tweet in which he said he was "coming back to Spain" -- however, it turned out to be a stunt for a gambling company.
- When does the transfer window reopen?
- All major completed transfer deals
On Tuesday, he posted a video of a Hammarby shirt with his name on the back and a source with intimate knowledge of the situation told ESPN FC to "take it seriously."
Ibrahimovic, 38, has yet to confirm whether he intends to keep playing football following his departure from MLS.
Hammarby chairman Richard von Yxkull said: "To get a person like Zlatan into the club, with the passion and winning mentality he stands for, feels right.
"It is too early to say anything in detail about how Zlatan can contribute to Hammarby, but there is clearly very great potential in the collaboration."
Zlatan to Tottenham 'not a gamble at all'
The FC guys try to wrap their head around rumours that Zlatan Ibrahimovic could head to Spurs.
Burley: Zlatan could work short term for Liverpool
Craig Burley explains how Zlatan Ibrahimovic would give Jurgen Klopp something his Liverpool squad is lacking.
Nicol: MLS will move on from Zlatan Ibrahimovic
Steve Nicol says MLS will keep thriving without Zlatan Ibrahimovic, despite his impact on the league.