The 22-year-old center has seven goals and 14 assists in 19 games this season.
"We are extremely pleased to be able to sign Ryan to a long-term deal," general manager Brian Burke said Tuesday. "He's demonstrated great character and work ethic to complement his talent, a rare combination at such a young age."
Getzlaf would have become a restricted free agent at the end of the season. The third-year player will earn $5.325 million per year under his new deal.
He had 25 goals and 33 assists, both career highs, while playing in all 82 regular-season games last season. He led the Ducks in scoring during the playoffs with seven goals and 10 assists.
Getzlaf's deal is worth more than the five-year, $21.25 million offer sheet Dustin Penner signed with Edmonton after the Ducks declined to match and let the 24-year-old left winger go in August.
Penner is earning $4.25 million in each of the next five seasons. He scored 29 goals for the Ducks last season.
At the time, Burke said that such a big-money offer to a young player like Penner was "highly inflationary in that age group."