The deal, which was announced Wednesday, includes a no-movement clause and a limited no-trade clause, a source told ESPN.
The extension kicks in at the start of next season and will come with an average annual salary-cap hit of $5.75 million.
Fleury is 7-2-0 this season with a 1.89 goals-against average and .931 save percentage.
"I believe in Marc-Andre Fleury, as the team does," Penguins general manager Jim Rutherford, a former goaltender, said in a statement released by the team. "He's won before and he will win again. We're very pleased to have him signed long term."
The 29-year-old was the first overall draft pick in 2003 and won a Stanley Cup with the Penguins in 2009.
The team declined to negotiate with Fleury over the summer following a massive front-office overhaul that saw Rutherford replace Ray Shero and Mike Johnston take over as head coach for Dan Bylsma.
Rutherford backed Fleury recently even as Fleury downplayed his uncertain future. He's sparkled as the Penguins have adjusted to Johnston's style of play. He posted consecutive shutouts for the first time in wins over Los Angeles and Buffalo last week to push his career total to 31.
ESPN.com's Pierre LeBrun and The Associated Press contributed to this report.