The Germany international has agreed a two-and-a-half year deal with the Bundesliga champions, keeping him at the Allianz Arena until 2020.
"I'm delighted," Wagner told Bayern's official website.
"A long journey for me is now at an end and I can return to my home, my club. I'm very happy that it's come off. Bayern are the best club in Germany and one of the best in the world.
"When I got the offer, I didn't have to think about it for long. Wagner, who came through the youth set-up at Bayern, is joining a side 11 points clear at the top of the Bundesliga."