Messi, 34, has been a free agent since his previous terms expired on June 30, but ESPN revealed in July that a loose agreement over a five-year extension had been reached.
However, Barca have been unable to register Messi's new contract with LaLiga while complying with the league's financial fair play rules. President Joan Laporta will address the situation in a news conference on Friday morning.
Barcelona said in a statement: "Despite having reached an agreement with Messi and with both parties clearly wanting to sign a new contract, it cannot be finalised due to financial and structural problems [rules relating to the Spanish league].
"Given this situation, Messi will not continue his relationship with Barcelona. Both parties lament deeply that the desires of the player and the club cannot be met.
"Barca would like to wholeheartedly thank the player for his contribution to the growth of the institution and wish him the best in his personal and professional life."
Sources at Paris Saint-Germain have told ESPN's Julien Laurens they remain confident the club would still be able to confirm a deal for Messi should he not sign a new deal with Barcelona -- but they are skeptical of that happening, believing the latest move to be a bluff intended to keep him at Camp Nou. Sources have said that Messi's camp made contact with PSG president Nasser Al-Khelaifi and sporting director Leonardo after Barca's announcement on Thursday.
Hislop: Messi's departure highlights how poorly Barcelona is run
Shaka Hislop and Craig Burley discuss the news of Lionel Messi leaving FC Barcelona.
PSG representatives have worked for weeks on negotiating a move for Messi that would also see Neymar and Kylian Mbappe remain in Paris but sources have told ESPN that previously the club never felt it was a deal that could realistically come off, with Messi always expected to remain at Barcelona.
It is not clear if Manchester City, meanwhile, would enter the bidding. The Premier League champions wanted Messi last summer but signed Jack Grealish on Thursday for £100 million and sources close to the club made contradictory comments when approached by ESPN. Some ruled it out completely; others left it up in the air.
Spanish clubs must comply with a spending limit, which includes money spent on salaries and signings, determined by LaLiga.
Barca's spending stood at over €600 million before the coronavirus pandemic but was reduced to €347m last season and is expected to be slashed even further for the upcoming campaign.
Therefore, to register Messi's new contract with the league, the Catalan club needed to reduce their wage bill or bring in a significant amount of money in transfers.
However, the club have failed to move on big earners such as Miralem Pjanic, Philippe Coutinho and Samuel Umtiti and have so far failed to reach an agreement with some of the club's longer-serving players over wage cuts.
Gracias, Leo pic.twitter.com/zQDFiDUK47— FC Barcelona (@FCBarcelona_es) August 5, 2021
Messi tried to leave Barca last summer after falling out with president Josep Maria Bartomeu, but ended up staying against his will. He believed a clause in his contract allowed him to leave for free, but Barca said that was not the case. With the prospect of a legal battle on the horizon, Messi backed down.
The election of Laporta as Bartomeu's successor in March had seemed to change the situation completely. Messi and his family are close to Laporta, who was president when Messi broke into the club's first team.
Laporta has always said he was "confident" of reaching an agreement for Messi to stay at the club and that the key was building a sporting project that would guarantee him success on the pitch.
However, sources have told ESPN that Messi has been left unconvinced by the work done in the transfer market this summer, with another adding that there was also disagreement over the breakdown of the commission payments involved in the proposed new contract.
Messi's departure is a historic moment for the club. He first joined Barca's academy in 2000 and has gone on to play 778 games for the club, breaking Xavi Hernandez's appearance record last season.
He has scored 672 goals, another club record, and has helped Barca win, among other trophies, 10 LaLiga titles and the Champions League on four occasions.
In the process, Messi has won the Ballon d'Or on six occasions and is among those considered the greatest to play the game.