The Camp Nou side have confirmed that the Argentine attacker is set to sign a new and improved deal in the upcoming days
The Catalan club had been in talks with the Argentina international over a renewal for a number of weeks and the forward has now agreed to a new deal worth around €20 million net per season which will make him the highest-paid player in the world.
"FC Barcelona has reached an agreement to adjust the terms in the contract binding Leo Messi to the club as a professional first team player," a short statement said on Friday.
"The revised and updated contract will be signed over the next few days."
The new deal marks a happy ending to a difficult season for Messi, who has missed large chunks of the current campaign through injury and also faced a court case for tax evasion late last year.
The Argentine, who has hit 354 goals in 424 appearances since making his debut for Barca at the age of 17 in 2004, signed improved terms in February last year to earn around €12.5m annually but later saw that deal eclipsed by Cristiano Ronaldo's new contract at Real Madrid.
"It should give peace of mind to him and especially to the club, who can continue to count on the best player in the world," coach Gerardo Martino said on Friday."
Martino is set to leave the Catalan club this summer and will be replaced by Luis Enrique, who is keen to make Messi the cornerstone of his new sporting project at Camp Nou next season.