Since arriving in 2019, the 30-year-old centre-back has made 266 appearances for United and lifted both the Carabao Cup and the Emirates FA Cup.
Speaking after putting pen to paper, Maguire said: "Representing Manchester United is the ultimate honour. It is a responsibility that makes myself and my family proud every single day.
"I am delighted to extend my journey at this incredible club to at least eight seasons and continue to play in front of our special supporters to create more amazing moments together.
"You can feel the ambition and potential of this exciting squad. The determination throughout the whole club to fight for major trophies is clear for everyone to see and I am confident that our best moments together remain ahead of us."
Jason Wilcox, Manchester United's director of football, added: "Harry represents the mentality and resilience required to perform for Manchester United. He is the ultimate professional who brings invaluable experience and leadership to our young, ambitious squad.
"Harry, like everyone at the club, is completely determined to help Manchester United to achieve regular and sustained success."
Maguire's new deal ensures United retain one of their most experienced defenders as they aim to challenge for trophies in the coming seasons.