The Portugal international has largely featured as Manchester United's first choice right back this season, making 42 appearances across all competitions.
Dalot moved to Old Trafford from FC Porto in the summer of 2018 for £19m.
The 24-year-old spent the 2020/2021 season on loan at AC Milan but is now a regular at Old Trafford, playing the whole game as Manchester United beat Newcastle United to win the Carabao Cup in February.
Dalot has the chance to win the FA Cup when they meet Manchester City in Saturday's final at Wembley.
“Playing for Manchester United is one of the highest honours that you can have in football," Dalot told the club's website.
“We have shared some fantastic moments over the past five years, and I’ve grown so much and my passion for this incredible club has only increased since the day that I joined.
"As a group of players, we all feel like we are at the start of a special journey right now. I can assure you that I will dedicate myself relentlessly to helping this group to achieve our aims and make the fans proud of this team."
United's football director John Murtough welcomed the news, saying: 'Diogo is an excellent defender, with a great combination of pace, strength and versatility.
'He has consistently developed, improving year-on-year since joining the club in 2018.
'Diogo's work ethic and professionalism is superb; the way in which he prepares himself every day in order to perform at his highest level is exactly what we all want from a Manchester United player.
'Diogo has a strong mentality, high standards and a great personality, and we are delighted that he will remain an important member of the squad for the coming years.'