The all-cash deal is likely to have a huge effect on the telecoms industry, with Microsoft expected to make widespread investment in a bid to develop mobile devices and rival market leaders Apple and Samsung.
Microsoft will pay approximately €3.79 billion for the mobile phone unit and €1.65 billion to license the patents.
The deal means Nokia will now operate as a telecoms equipment company.
The acquisition is seen as a big bet by Microsoft’s outgoing CEO Steve Ballmer, and the deal sees the end of Nokia’s 30-year history in the mobile phone market.
Stephen Elop, Nokia’s chief executive will step down as the head of the mobile phone unit and return to Microsoft, with rumours suggesting he is a front-runner to replace Ballmer.
“We need more combined muscle to truly break through with consumers,” said Elop at a press conference.
Ballmer, who is due to step down from his post at Microsoft in a year, added: “It’s a bold step for the future – a win-win for employees, shareholders and consumers of both companies.”
32,000 Nokia staff are set to transfer to Microsoft, with 4,700 based in Finland.