There had been speculation the Portugal international would leave United this summer.
Instead, he has signed a deal that will keep him at Old Trafford until 2018.
"I'm really pleased Nani has re-signed for the next five years," said United boss David Moyes.
"He has great ability and experience and beyond his 26 years."
Following the capture of Wilfried Zaha from Crystal Palace, it did seem United had a wide player too many given the presence of Ashley Young and Antonio Valencia in the Red Devils squad.
With a year remaining on his contract, and the transfer deadline just passed, there did appear an obvious need to secure Nani's services for an additional amount of time in order to prevent him leaving for nothing in 12 months.
Yet the length of contract does indicate Moyes has faith in a player who has struggled to consistently hit the heights during his six years at the club.
"I've been impressed with his approach to training and look forward to working with him in the coming seasons," added Moyes.
Nani does boast an impressive medal collection since his £17million move from Sporting Lisbon.
He was part of the Champions League-winning squad in his debut campaign, scoring a crucial penalty in the shoot-out triumph over Chelsea.
Last season he won the Premier League for the fourth time and whilst there was talk he was unhappy at the terms he was offered to remain at United last season, it seems now he is much happier.
"Playing at United has been a fantastic experience for me," he said.
"When I came to the club, I never imagined the success we have enjoyed.
"Training every day with top players who want to win trophies every year is a great motivation to me.
"I'm very happy that the new manager has shown this faith in me and I'm looking forward to helping the team compete for more honours this season."