The new contract is a two-year deal with a mutual option for 2022, according to Joe Frisaro of MLB.com.
His contract was set to expire at the end of the 2019 campaign.
"I'm thrilled to have the opportunity to see this through," Mattingly said of the Marlins' rebuild, according to Manny Navarro of The Athletic. "I see the talent coming ... hopefully by the time I'm done this team is in a great spot. That's kind of been my vision from the very beginning."
Marlins CEO Derek Jeter spoke confidently of Mattingly's abilities to guide the young squad going forward.
"He keeps our guys competing on a daily basis," Jeter said, according to Navarro.
Entering Friday, Mattingly's all-time record with the Marlins is 272-364.