The 26-year-old made only seven league starts last season, but new manager David Moyes has confirmed his faith in him by awarding him a deal that ties him to Old Trafford until 2018.
"I'm really pleased Nani has re-signed for the next five years," Moyes told the club website.
"He has great ability and experience beyond his 26 years. I've been impressed with his approach to training and look forward to working with him in the coming seasons."
A skilful, two-footed winger, Nani joined United from Sporting Lisbon in May 2007 and has won four Premier League titles, two League Cups, the Club World Cup and the 2008 Champions League during his time in Manchester.
"Playing at United has been a fantastic experience for me," said Nani, who made his first appearance of the season in Sunday's 1-0 league defeat at Liverpool.
"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."