The Burnley striker has cut short his season-long loan move to Turkish giants Besiktas to make the move possible.
Weghorst scored nine goals in 18 games during his short spell with Besiktas.
He joined parent club Burnley from Wolfsburg in January 2021 but scored only two goals in 20 Premier League appearances as the Clarets were relegated from the top flight.
Manchester United were in need of a striker after Cristiano Ronaldo left the club for Saudi Arabia's Al Nassr.
"I feel privileged to be joining Manchester United," Weghorst said after completing the move.
"I've played against the club in the past and it's a fantastic feeling to now have the chance to pull on the famous red shirt.
"I've seen United's progress under Erik ten Hag this season and can't wait to start playing my part in pushing the team towards its aims.
"Whatever happens in the next few months, I can promise to give everything to the club for as long as I am here.
"I thank everyone who has played a part in getting me to this stage, and now I am looking forward to meeting my new team-mates and getting involved straight away."
Manchester United football director John Murtough said: "Wout has a consistent goalscoring record across several European leagues, and his attributes will add a further dimension to our squad for the remainder of the season.
"We were also attracted by his strong personality and dedicated approach to football, which fits perfectly with the spirit that Erik is building within our squad.
"He has shown a huge desire to join Manchester United and be part of what we're striving to achieve this season."