The France international's deal with the Catalan giants expired at the end of June, and there had been claims that both Paris Saint-Germain and Chelsea were keen to sign him on a free.
However, Dembele's priority has allegedly always been to stay at Barcelona, with the Frenchman deciding against renewing before his contract expired as he was unhappy with the terms on the table.
A statement on the Catalan side's official website has now revealed that an agreement has been reached for the World Cup winner to re-join the club on a deal until June 2024.
"FC Barcelona and the player Ousmane Dembele have reached an agreement for a contract until 30 June 2024," read the statement on Barcelona's website.
The Catalan club's president Joan Laporta recently said that the club would not place a deadline on Dembele's future, with the two parties needing to come to an agreement.
"He is a person that we appreciate very much," Mundo Deportivo quoted Laporta as saying. "He has played at a very high level in the second half of the season and the coach is very satisfied with him.
"It is an economic question, he has answered us without saying 'yes' or a 'no'. We maintain a good relationship with the player and there is communication with the agents. If he accepts the conditions that we have presented, he will continue, if not, then no.
"We don't set deadlines for anything, not for signings, not for levers or anything. Now that we've activated the first lever, we've released quite a bit of pressure. We are working hard, both for players and levers."
Dembele had allegedly wanted double the €6m (£5.2m) salary that had been placed on the table, but it is understood that he has now accepted the reduced salary.
Dembele, who was told to leave in January after refusing to sign a new deal, enjoyed a productive 2021-22 campaign despite some injury troubles, scoring twice and providing 13 assists in 32 appearances in all competitions.
Meanwhile, he has scored 32 goals and registered 34 assists in 149 appearances for the Catalan giants since arriving from Borussia Dortmund in August 2017.
Barcelona boss Xavi is believed to have played a key role in Dembele re-joining the club, with the Spaniard making it clear that he would be a leading player for the team next season.
Bayern Munich, Liverpool, Manchester United and Juventus are also believed to have expressed an interest in signing the Frenchman during his contract saga at Camp Nou.
There will be serious competition for places in the Barcelona attack next term if both Raphinha and Robert Lewandowski arrive this summer, with Dembele set to battle the likes of Memphis Depay, Ansu Fati, Ferran Torres and Pierre-Emerick Aubameyang for spots in the side.