Schweinsteiger, 30, who has made 500 appearances for the Bundesliga champions, had one year left on his deal in Bavaria and has signed for an undisclosed fee, believed to be around £14million.
Schweinsteiger told the club’s website: “I have thoroughly enjoyed my time at Bayern Munich, it has been an incredible journey and I didn’t take the decision to leave lightly.
“Manchester United is the only club that I would have left Munich for. I feel ready for this new and exciting challenge in what I regard as the most competitive league in the world and I am looking forward to working with Louis van Gaal again.
“I will never forget my time at Bayern Munich and I would like to thank everyone at the club and the fans for the great memories.”
United boss Louis van Gaal has revealed his delight at the capture of the Germany captain, whom he worked with at Bayern.
“Bastian is, of course, no stranger to me. I worked with him during my time at Bayern Munich and I am truly delighted he is joining Manchester United.
“His record speaks for itself; he has won every honour at club level and was a major part of the successful Germany World Cup-winning team last summer.
“Bastian is the ultimate professional and there is no doubting his talent and his ability to control games. He brings a wealth of experience and is an excellent addition to our squad,” said Van Gaal.