The 34-year-old Argentine had come out of contract on July 1 while away at the Copa America but had been expected to extend his Barcelona stay.
Messi and Barcelona had reached an agreement on a new deal, with a clear intention to re-sign.
However, La Liga regulations on player registration and finances have complicated matters, leading to the club confirming on Thursday that he would not be staying.
“As a result of this situation, Messi shall not be staying on at FC Barcelona,” Barcelona wrote in a statement.
“Both parties deeply regret that the wishes of the player and the club will ultimately not be fulfilled.
“FC Barcelona wholeheartedly expresses its gratitude to the player for his contribution to the aggrandisement of the club and wishes him all the very best for the future in his personal and professional life.”
Messi has been with Barcelona throughout his entire professional career, debuting for the Catalans in November 2003.
He joined Barca from Newell's Old Boys in 2000 as a 13-year-old at the club’s youth academy La Masia.
Messi’s next destination in unclear, although English champions Manchester City have previously shown interest, with links with ex-Barca boss Pep Guardiola.
Big-spending French club Paris Saint-Germain may also make a move for Messi.