This is the Argentina international's sixth renovation in eight years.
While Messi's new deal might not see a vastly different deal from the last one, the star will continue to earn approximately €11 million a year after tax. The buy-out clause remains €250 million.
The news was confirmed via a statement issued by Barcelona's official website on Thursday.
"This afternoon Leo Messi extended his contract with FC Barcelona through June 30 of 2018," the statement said. "The signing ceremony was attended by the player, president Sandro Rosell, vice-president Josep Maria Bartomeu and director of football Andoni Zubizarreta. Messi added two additional years to his existing contract, which was set to expire in June of 2016. The player, who joined the club when he was 13 years old and made his first-team debut three years later, will be 31 when his contract expires."
Here are some of the quotes by Messi, showing the tight bond between the star and the club...
"I don't know how I'll be when I'm 31. I take it one day at a time and I want to continue playing football for Barca."
"I said it before - in Europe I'd like to end my career at Barca. I wouldn't consider moving to another European club. With that said, I'm not ruling out the possibility of ending my playing career in Argentina."