Solskjaer's United finished as runners-up to Manchester City in the 2020-21 Premier League season and reached the final of the Europa League, losing 11-10 on penalties to Villarreal.
United confirmed the Norwegian's new deal contained an option for a further year.
Solskjaer said: "Everyone knows the feeling I have for this club, and I am delighted to have signed this new contract. It is an exciting time for Manchester United, we have built a squad with a good balance of youth and experienced players that are hungry for success.
"I have a fantastic coaching team around me, and we are all ready to take that next step on our journey. Manchester United wants to be winning the biggest and best trophies and that's what we are all striving for. We have improved, both on and off the pitch, and that will continue over the coming seasons.