Macheda is the leading goalscorer for United's U21 team this season but his first-team opportunities have been limited, although he made the bench for the FA Cup third-round draw at West Ham.
Stuttgart, currently 10th in the Bundesliga, have been looking to acquire a forward and their director of sport Fredi Bobic has been monitoring Macheda.
"We have been watching him for a while now," Bobic said recently. "He is one of the players we have on our shortlist."
And they have now wrapped up a deal for the 21-year-old, who has previously been on loan at Sampdoria and QPR, without a massive amount of success.
Macheda said: "I have followed the Bundesliga and naturally know about Stuttgart. I am glad that I can now play for the club.
"For me, it is about getting to know the team and what I can bring, because we have a lot of interesting games in three different competitions in front of us."
Stuttgart have snatched Macheda from under the noses of Spanish second division side Elche, who said earlier in the week that they were poised to take the forward on loan.
With Robin van Persie, Wayne Rooney, Danny Welbeck and Javier Hernandez all fit, Macheda has understandably struggled to break into the first-team squad at Old Trafford this term.
Back in 2009, he famously scored a crucial goal against Aston Villa as a 17-year-old, which helped United to clinch the title.