The 23-year-old had two years to run on his previous deal, which he signed when he joined from Sporting Lisbon in 2007.
That has now been replaced by the new commitment which takes Nani through to June 2014.
Manager Sir Alex Ferguson believes Nani is fulfilling the potential he had when he moved to Old Trafford.
Ferguson said on www.manutd.com: "Nani is an emerging talent within the team and has developed tremendously since joining the club. We are delighted he has signed a new contract and I am sure he will have a long and successful future here at Manchester United."
Nani said: "I am delighted to have signed a new contract. It has been like a dream come true to play for Manchester United. The coaching staff have taught me so much about the game and I'm playing alongside some of the best players in the world. I'm looking forward to winning many more trophies with this team."