De Gea, 28, made 367 United appearances since Sir Alex Ferguson brought him to the club from Atletico Madrid in an £18.9m deal in June 2011.
“Now my future is fixed, all I want is to help this team achieve what I believe we can and win trophies again, together,” said the Spaniard.
“It has been a privilege to spend eight years at this great club.”
De Gea, capped 40 times by Spain, helped United win the Premier League title in 2012-13, the FA Cup three seasons later and both the League Cup and the Europa League in 2016-17.
The Spaniard, who has consistently been linked with a move to Real Madrid in recent seasons, was in the last year of his contract and would have been able to open talks with clubs outside England over a possible move in January.
He came close to joining Real in a £29m move in September 2015, but the deal collapsed because the necessary paperwork was not submitted in time on the final day of the transfer window.