The contract is worth $30.625 million and averages $4.375 million per season, beginning July 1, 2017, sources said.
The contract makes Petrino the ACC's third-highest-paid coach behind Florida State's Jimbo Fisher and Clemson's Dabo Swinney, who agreed to a new six-year deal Tuesday. Miami's Mark Richt makes about $4 million a year.
"I'm thrilled with the job that Bobby has done here, and it's been great to have his wife Becky, their children and three grandchildren back in the city of Louisville," athletic director Tom Jurich said in a statement.
Petrino is 17-9 in two seasons, including consecutive bowl bids, since returning to Louisville in 2014 on a six-year deal worth $3 million a year. He also had a 41-9 record while coaching the Cardinals from 2003 to 2006. He has guided the Cardinals to a bowl game in all six seasons at the university.
"It is great to go on the road and into the homes and tell recruits I will be your coach throughout your career," Petrino said Thursday.
Overall, Petrino has an 11-year college coaching record of 100-39 with his other stops at Arkansas (2008-11) and Western Kentucky (2013).
"He has exceeded my expectations on the field, especially closing last year with a win in the Music City Bowl over a talented Texas A&M team. I think the future of this program is extremely bright, and I'm excited that with this extension, Bobby has reinforced his commitment to the University of Louisville," Jurich said.