After being pursued by Bayern for much of the summer, the 23-year-old has finally put pen to paper on a deal in Munich after the German giants met the reported €40million release clause in his Bilbao contract.
The Spain international, who was also a reported target of Manchester City, came through a medical on Wednesday before Bayern confirmed the news for what is expected to be a club record fee on their official website.
Martinez, who has been given the number eight shirt at his new club, says he is pleased to have finally joined after a protracted saga.
"I am very happy and pleased to be at a club with such a history," he said. "I have had a very long wait."
Bilbao claimed that Martinez, who can play either as a defensive midfielder or in the centre of defence, had left to discuss terms and undertake a medical in Munich without their permission.
Bayern CEO Karl-Heinz Rummenigge says the player helped push the move through by accepting a lower salary.
"Of course this is a large sum," he said. "But the player participates indirectly in it. He has given up large sums in his salary."