FC Barcelona and Dani Alves have reached an agreement in principle for the player to join the football first team for the remainder of the current season.
The Brazilian will be joining training from next week but will not be able to play until January.
The club said it will announce the full details at his official presentation as a new FC Barcelona player.
Alves had previously made it clear he was keen to return and has now been granted his wish to play for the Catalan giants for the second time.
Dani Alves came to FC Barcelona in the summer of 2008 after five brilliant seasons in Sevilla. In the Catalan capital, he made the right-back slot his own across eight seasons, making 391 official appearances and scoring 23 goals.
Although his main role has always been in defence, in the true Brazilian wing-back tradition, Alves also likes to join the attack, where he has a fine shot from outside the area, earning him the reputation as one of the finest players of all time in his position, read a press release by club.
The Spanish club said that Alves was an automatic choice under all of Pep Guardiola, Tito Vilanova, Tata Martino and Luis Enrique, and the fans loved his dedication and extroverted character.
In the summer of 2016, he left for Juventus, and since then has been at Paris Saint-Germain and lastly, at São Paulo back in his home country.
Alves has also played for Brazil, winning six major titles, most recently the Tokyo Olympic Games, where he lined up in the final against what are now his team-mates Òscar Mingueza, Éric Garcia and Pedri.