Barcelona say Lionel Messi will not be staying at the club “because of financial and structural obstacles”.
Messi, 34, has been a free agent since 1 July when his contract expired.
He agreed a new deal on reduced wages with the club two weeks later, but it was dependent on Barca selling players to afford his salary.
“Both parties deeply regret that the wishes of the player and the club will ultimately not be fulfilled,” the club said.
Is this really the end for Messi at Barcelona?
Barcelona had said Messi was poised to extend his 21-year association with the club by signing the new deal on Thursday, and blame La Liga for the failure to do so.
He had reached an agreement to stay with the Catalan side until 2026 – but La Liga said the club must reduce wages before he and any new players can be registered.
“Despite FC Barcelona and Lionel Messi having reached an agreement and the clear intention of both parties to sign a new contract today, this cannot happen because of financial and structural obstacles [Spanish La Liga regulations],” the club said.
“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 is Barcelona’s record scorer with 672 goals and has won 10 La Liga titles, four Champions Leagues and seven Copa del Reys, as well as claiming the Ballon d’Or on a record six occasions.
Keeping Messi at the Nou Camp had been president Joan Laporta’s top priority this summer.
The Barca future of a player who is widely regarded as being one of the world’s greatest of all time, however, has been severely complicated by the club’s financial problems.
The presidential election earlier this year was held against the backdrop of Barca being on the verge of bankruptcy.
The Argentine arguably now becomes the most in-demand player in world football.
Messi has long been linked with a move to either Paris St-Germain or Manchester City, where he would be reunited with his former Barcelona boss Pep Guardiola.
America’s Major League Soccer, which Messi has previously considered experiencing, is another option.
The announcement that Messi is to move on comes a year after he sent a fax to Barcelona bosses saying he wished to exercise a clause in his contract that would have allowed him to leave for free last summer.
Days later he said he would stay, admitting it was “impossible” for any team to pay his 700m euro (£624m) release clause, which Barca insisted needed to be met.
Aged 13, Messi joined Barca’s famed La Masia academy in 2000 from Argentine side Newell’s Old Boys and made his senior debut aged 16 in 2004.
He has gone on to make 778 appearances for the club, scoring 672 goals, including 120 Champions League goals (second behind Cristiano Ronaldo), and a record 474 La Liga goals.
He has collected the European Golden Shoe award for the continent’s top scorer on six occasions.
BBC