Alves, 33, joined from Sevilla and won three Champions Leagues, six La Liga titles and four Copa del Rey trophies.
The Catalan club's director Robert Fernandez said: "Dani Alves has decided to leave. It's a personal decision that the club have to accept."
The Spanish champions also said they will exercise a buy-back option to sign Denis Suarez from Villarreal in July.
Suarez, 22, joined Villarreal from Barcelona last summer and signed a four-year deal but Fernandez said they will now be "notified of his return".
Alves signed a one-year deal at the club last summer and will leave a free agent at the end of a season in which Barca secured a league and cup double.
His tally of 391 games is the second-highest for a foreign player at the club behind Lionel Messi.
Alves, who netted 21 goals in his eight years at Barca, wrote a message for the clubs fans on Instagram when it was announced he would leave the club.
The Brazilian said the club was home to "the greatest accomplishments of my professional career".
"From the first day, from the first training session under Pep Guardiola until the last day of this past season, I have had the good luck to enjoy football with passion," wrote Alves.
"I am a privileged, hard-working and honoured football player, for whom life has allowed me to wear the shirt of the best club in the world in a prodigious decade marked by the quality of the players and coaches.
"I am going, but I will be back, because I am not just another player."
Brazil international full-back Dani Alves will leave Barcelona after eight years at the club.