The 34-year-old, capped 116 times by Sweden, left French champions Paris St-Germain at the end of last season.
“I am absolutely delighted to be joining Manchester United and looking forward to playing in the Premier League,” he told the club’s website.
Ibrahimovic is United’s second signing of the summer after Villarreal defender Eric Bailly joined for £30m.
The former Barcelona and Juventus player has scored 392 goals in 677 games and won a trophy every season of his career since 2001, including 13 league titles.
Last season was his most prolific, scoring 50 goals in 51 matches, a record for PSG. His tally of 38 league goals was also a club record.
In his four seasons at the French club, he won 12 trophies, including the domestic quadruple twice. On announcing he was leaving the Ligue 1 club, he tweeted: “I came like a king, left like a legend.”
“Zlatan needs no introduction. The statistics speak for themselves – Jose Mourinho, Manchester United manager”
He links up with his former Inter Milan boss Jose Mourinho at Old Trafford.
Ibrahimovic added: “I cannot wait to work with Jose Mourinho once again. He is a fantastic manager and I am ready for this new and exciting challenge.
“I have thoroughly enjoyed my career so far and have some great memories. I am now ready to create more special memories in England.”
Ibrahimovic quit international football after Sweden were knocked out of Euro 2016 in the group stages.
Portuguese Mourinho, who took charge after the sacking of Dutchman Louis van Gaal, said: “Zlatan needs no introduction. The statistics speak for themselves. Ibra is one of the best strikers in the world.
“He has won the most important league championships in the world of football, now he has the opportunity to play in the best league in the world and I know he will grasp this opportunity and will work hard to help the team win titles.
“I am certain that his talent will delight fans at Old Trafford next season and that his experience will be invaluable in helping to develop the younger players in the squad.”