The Red Devils continued their imperious form in Europe, though defeat for the Ukrainian side, coupled with a win for Bayer Leverkusen, sees them exit the tournament
In a match the Premier League champions struggled to control, and with Shakhtar needing to win as Bayer Leverkusen claimed three points against Real Sociedad, it took a Phil Jones strike midway through the second half to separate the two sides.
David Moyes' strong line-up showed he was eager to prevent his side from slipping to a third consecutive home defeat after suffering 1-0 losses to Newcastle and Everton domestically; Wayne Rooney came back into the side, though Robin van Persie only made the bench.
Shakhtar coach Mircea Lucescu handed returns to Brazilian strike duo Fred and Taison but it was United who started more brightly, as Jones forced goalkeeper Andriy Pyatov to block.
The visitors should have taken a 12th-minute lead when a defence-splitting ball from midfield set Teixeira away, but he dragged his shot wide. At the other end, Adnan Januzaj controlled expertly on his chest before spinning and firing goalward, forcing a fine save from Pyatov.
Shakhtar were the more dangerous in the final third – Teixeira winding his way past several challenges midway through the half with a run that deserved better than his tame finish.
However, Ashley Young wasted two gilt-edged chances to give United an advantage as first he outmuscled Darijo Srna, only to lob beyond the far post, before slicing woefully wide.
There was no doubt some strong words from Moyes in the dressing room at half-time, but the home side seemed to still be taking them in when a corner across the box missed everyone a minute after the restart and Yaroslav Rakitskiy scuffed a shot against the outside of the post.
Finally, United burst into life as Rooney's audacious chip from distance almost caught Pyatov off his line. Reinforcements arrived in the shape of Van Persie and Tom Cleverley, and the Dutchman had not even touched the ball when Rooney's clever pass almost played him in.
But it was Jones who stepped up when United needed a hero. After they had pressed Shakhtar to win a 67th-minute corner, Van Persie's set-piece from the right bounced through everyone in the box where Jones angled his body to drill beyond Pyatov.
Srna forced David de Gea into a smart save late on, but United held firm and Van Persie almost added late gloss to the scoreline when a clipped finish flashed wide. The Red Devils go through as group winners, while Shakhtar settle for the Europa League.