"As a result of this situation, Messi shall not be staying on at FC Barcelona. 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 best for the future in his personal and professional life."
The Spanish league requires its clubs to comply with a spending limit, and the coronavirus pandemic has tightened that limit considerably, with Barcelona's spending already cut by more than a third.
The club has been trying to reduce its wage bill.
Nevertheless, Barcelona President Joan Laporta had been maintaining that he was "confident" that Messi would end up staying.
Last month Spanish media reported the two sides had reached a broad agreement regarding the terms of a new contract, including a 50 per cent reduction in his salary.
But a photo of Messi with Brazilian star Neymar and several of his teammates from French club PSG sent the rumour mill running wild before Barcelona confirmed the split.
Messi's sudden availability on the transfer market will send massive ripples through world football, with other clubs likely to put their previous plans on hold.
English giant Manchester City, for example, is reportedly on the cusp of signing Jack Grealish for $188 million. For City, the idea of signing Messi could put that deal on pause.