Giroux's contract includes a no-movement clause, and he will have an annual cap hit of $8.275 million when it goes into effect in 2014-15.
The eight-year length is the longest permitted under the new collective bargaining agreement.
"We think the world of Claude, and think he's one of the top players in the game," general manager Paul Holmgren said.
In 2013-14, Giroux will be paid $5 million, with a $3.5 million cap hit.
As of now, Giroux has the NHL's fifth-highest cap hit for 2014-15, behind Washington's Alex Ovechkin ($9.54 million), Pittsburgh's Evgeni Malkin ($9.5 million) and Sidney Crosby ($8.7 million), and Anaheim's Corey Perry ($8.625 million).
Giroux could have become a restricted free agent after next season. Holmgren said it would have been "risky" for both sides not to get a deal done before then.
The Flyers wanted to lock up Giroux before Friday's free-agent frenzy started at noon.
Giroux said he and Holmgren wanted "to make sure we get this out of the way, and from now on we can start focusing on the right thing."
Playing in 42 games as a rookie in 2008-09, Giroux recorded nine goals and 27 points. Since then, he has blossomed into one of the NHL's marquee players.
"Five years ago, I was just trying to get a spot in the NHL and make sure I get as much ice time as I can to be able to prove what I can do," said Giroux, who was the Flyers' No. 1 pick (22d overall) in the 2006 draft. "A lot of that credit goes to the coaching staff and the management to have that trust in me."
Seeing so many of his former teammates go to the Stanley Cup Finals in the last two years, Giroux said, serves as a "motivation to want more, and to just want to win the Cup. It's the only thing that we really think about. It's a tough Cup to win, but you've just got to learn from your mistakes. Last year was a tough season as a team, but we're going to learn from it. We're a young team, and we've got new players on the team. I think everybody is pretty excited about the team, and they should be."
Giroux, the Flyers' leading scorer the last three seasons, had 48 points in the lockout-shortened, 48-game 2013 campaign. In 333 career games, he has 91 goals and 290 points.
Giroux's dollar total is second in Flyers' history. In 2007, the Flyers signed center Mike Richards to a $69 million extension, a 12-year deal that averaged $5.75 million per season. Richards was traded nine years before his contract with the Flyers would have expired after the 2019-20 season.
Contact Sam Carchidi at email@example.com. Follow on Twitter @BroadStBull.