Solskjaer, who leaves his role as manager of Norwegian club Molde, will be joined by Mike Phelan as assistant manager. Phelan previously carried out that role under former United boss Alex Fergsuon for five seasons before leaving in 2013.
United parted company with Mourinho with the club in sixth spot in the Premier League having made their worst start to a season for 28 years, culminating in a limp 3-1 loss to bitter rivals Liverpool at Anfield on Sunday.
The appointment of Solskjaer to inject some life into United in some ways mirrors his playing career at the club where he scored 126 goals between 1996-2007, often as an impact sub.
His most memorable contribution came in the 1999 Champions League final victory over Bayern Munich when he netted a stoppage-time winner.
"Manchester United is in my heart and it's brilliant to be coming back in this role," the 45-year-old former Cardiff City manager, said in a statement.
"I'm really looking forward to working with the very talented squad we have, the staff and everyone at the club".
Then Cardiff City manager Ole Gunnar Solskjaer takes his seat before their English FA Cup soccer match against Newcastle United at St. James' Park stadium in Newcastle, northern England January 4, 2014.
Coincidentally Solskjaer's first task will be to try and guide United to a much-needed three points away at Cardiff - the club who were relegated from the top flight on his watch in 2014 - on Saturday.
CLUB LEGEND
"Ole is a club legend with huge experience, both on the pitch and in coaching roles," United executive vice chairman Ed Woodward said. "His history at Manchester United means he lives and breathes the culture here and everyone at the club is delighted to have him and Mike Phelan back.
"We are confident they will unite the players and the fans as we head into the second half of the season."
Michael Carrick and Kieran McKenna, both part of Mourinho's backroom staff, will be retained at the club to work under Solskjaer, who won six Premier League titles and two FA Cups to go along with the 1999 Champions League triumph at United.
Solskjaer was given the blessing of Molde, who he steered to two Norwegian titles in 2011 and 2012, and even earned some plaudits from Norway's Prime Minister Erna Solberg, who tweeted: "FINALLY CONFIRMED! Great day for Norwegian football. Good luck keeping control of the Red Devils, @olegs26_ole"
Molde said that their manager's 'temporary' departure to United was an endorsement of the team's success.
"The fact that Manchester United asked to borrow Molde's manager is in itself a happening, and a vote of confidence in both Ole Gunnar and in Molde FC," the Norwegian club, who begin their new season in March, said in a statement.
"We're happy to lend them Ole Gunnar and wish both him and the club success," it added.
First team coach Erling Moe will take temporary charge of Molde, who finished second in the league last season.
Following the loss to league leaders Liverpool, Manchester United (26 points) are 19 points adrift of their rivals after 17 matches and 11 behind fourth-placed Chelsea.
Tottenham Hotspur manager Mauricio Pochettino has emerged as the early favourite to take over as United's permanent boss next season and the Argentine did little to quell speculation during a news conference on Tuesday.
"like always in football nobody can guarantee anything. What's going to happen in the summer? What is going to happen tomorrow? Nobody knows, The most important thing is to enjoy the journey," Pochettino told reporters.
The 46-year-old Pochettino, who joined Tottenham from Southampton in 2014, has guided the London club to three consecutive top-three finishes in the Premier League but is yet to win a trophy.