After returning to the club last year, he has confirmed that he is leaving again.
Five years after leaving Barcelona, the right-back returned in November.
He won six La Liga titles for Barcelona.
I would like to thank the staff for giving me the chance to come back and wear that shirt again. You do not know how happy I am.
"It closes a very beautiful cycle and opens another even more challenging one," he added in a post on Instagram.
During his eight-year stint with Barcelona, he won three times the European Championship and four times the Spanish version of the trophy.
During his time with Paris St-Germain and Barcelona, the Brazilian won both the French league and the Italian league.
He started both Brazil's wins over Japan and South Korea and hopes to make the World Cup squad.