The 32-year-old’s contract expired at the end of June but no decision had been made on his future until now.
Midfielder Sergi Roberto came through Barca’s La Masia academy and made his first team debut in 2010.
He was the unlikely hero of Barcelona’s stunning 6-1 comeback to beat Paris Saint-Germain in the Champions League last 16 in 2017, netting the final and decisive goal after the French side won 4-0 in the first leg.
“After 373 games, 25 trophies and an unforgettable goal, the footballer who arrived at La Masia at the age of 14 is leaving the club,” said Barcelona in a statement.
Sergi Roberto netted 19 times for Barcelona and won two Champions Leagues and seven La Liga titles among other silverware.
The versatile Spain international played mostly as a right-back in recent seasons as well as filling in elsewhere when required.
© Agence France-Presse
Photo: Colas Buera / Pressinphoto / Icon Sport