The Sharks said Barba had informed the club he had accepted a two-and-a-half-year deal offered by Toulon.
"Ben believes accepting this offer to be in the best interests of himself and his family," a Sharks statement said.
"While disappointed to be losing a player of his calibre, the welfare of Ben and his family is our main priority and we are supportive of the decision he has made."
Barba had planned on spending the second half of the French Top 14 season with Toulon before returning to the NRL mid-year after serving a 12-month suspension for illicit drug use.
But the NRL stated on Wednesday Barba could not start serving that ban until he returned to Australia.
The former Dally M Medal winner could now turn out for Toulon as early as next weekend's Global Tens tournament in Brisbane.
Toulon shocked the NRL world late on Tuesday by trumpeting Barba's signature until midway through 2017.
NRL chief executive Todd Greenberg declared Barba's suspension would not start until any overseas playing commitments were completed, virtually ruling Barba out of a return this year.
The NRL's strong stance led Barba to question whether to back-track, prompting Toulon to table a longer term deal, which he accepted.
The developments come after the NRL had recently granted Barba permission to train at the club and participate in community programs.
Barba's NRL career chequered but successful
Barba was a key component in the Sharks' maiden premiership win last year, but tested positive to cocaine in the week that followed the club's grand final victory.
He played 168 matches across his nine-year NRL career, having debuted in 2008 for Canterbury, who four years later he helped guide to the grand final in the same season he won the Dally M Medal.
He exited the club the following year amid domestic violence allegations and joined Brisbane.
Barba failed to recapture his best form at the Broncos and accepted a career lifeline from Sharks coach Shane Flanagan in 2015.
The Toulon deal is expected to place Barba as one of the highest paid players in the world behind All Blacks legend Dan Carter and new team-mates Matt Giteau and Leigh Halfpenny.
It also suggests the door is open for further raids on Australia's rugby league stars by Toulon due to the cross-code interest of their coach, former English league international Mike Ford.
Ford was instrumental in luring Sam Burgess from South Sydney to the 15-man game during his stint at English club Bath and has already secured Parramatta sensation Semi Radradra for Toulon after the 2017 NRL season.