The deal includes an option to extend the Spanish goalkeeper a further year.
"It has been a privilege to spend eight years at this great club and the opportunity to continue my career at Manchester United is a genuine honor," De Gea said.
"Since I arrived here, I could never have imagined I would play over 350 games for this club. Now my future is fixed, all I want is to help this team achieve what I believe we can and win trophies again, together.
"As one of the senior players in the squad, I want to support and lead in any way that I can to assist the younger players, so they know what it means to play here. I still feel that I have so much more to achieve at the club and I truly believe that Manchester United can build on the club’s tradition of success and reward our fans for their support.
"I am committed to continuing repaying the fans for all of the care that they’ve shown me during the good times and the bad."
Monday's announcement ends nearly a year of uncertainty surrounding De Gea's future, as it appeared United would risk losing him for nothing next summer if he played into January without a new contract.
The 28-year-old has made 367 appearances for the club and won numerous trophies since joining from Atletico Madrid in 2011, including the Premier League in 2012-2013 and the Europa League in 2016-17.