The 33-year-old central defender's current deal was due to expire at the end of this season.
Maguire joined Manchester United from Leicester City for £80m in 2019.
He has made 266 appearances for United, winning the League Cup in 2022-23 and the FA Cup the following season.
Maguire has enjoyed a revival under interim boss Michael Carrick, starting all 10 matches since his appointment in mid-January after previously struggling for game time under Ruben Amorim, and also missing eight games with a thigh injury.
Latest Manchester United news, analysis and fan views