Terms of the lucrative deal weren't announced, but the Los Angeles Times reported it was worth $69 million.
The 27-year-old Perry, a former Ducks first-round draft choice and winner of the 2010-11 Hart Trophy as the NHL's leading scorer, signed the deal after Anaheim also inked linemate Ryan Getzlaff to a long-term contract this month.
"Staying in Anaheim has always been my first choice," Perry said. "This is a great place to play, and I'm very grateful to have the opportunity to remain here."
Perry played a key role in the Ducks' 2007 Stanley Cup championship and has compiled six goals and 15 points over 21 career playoff contests.
Man spent 15 hours in jail for plugging electric car into an outlet at a school
Exploding whale video goes viral on Internet