Wasps' win over Leinster saw them snatch first place in the group, leaving Toulon to qualify as one of three runners-up.
Steffon Armitage and Bryan Habana went over for the French side either side of half-time at the Rec.
Anthony Watson scored Bath's only try, as George Ford kicked three penalties.
The Premiership side's hopes of progressing out of the pool were over last weekend after their 25-11 defeat by Leinster.
Mike Ford's team exit the competition with two wins from six games and finish third in the table.
Toulon went into the final pool game on top of the group by one point, after their last-gasp victory over Wasps last weekend.
But the Premiership side ran in seven tries against bottom side Leinster on Saturday, and they went through as group winners because of their head-to-head record against Toulon.
Bath had nothing to play for in Saturday's game, but they were looking to kick-start their season, after winning only three from eight in the league.
They fell behind to two James O'Connor kicks, before fly-half and captain Ford got the hosts off the mark with the boot.
Toulon extended their lead when England exile Armitage, whom Bath had tried to sign last year prior to the World Cup, was left unmarked and he powered over.
The hosts got off to the perfect start in the second half when Watson touched down after a sublime passing move from Horacio Agulla and Kyle Eastmond.
Ford missed the conversion before landing a penalty to give Bath a narrow 14-11 lead, but it did not last.
Scotland flanker David Denton gave the ball away to South Africa wing Habana and he sprinted over to score an easy try for Toulon.
Full-back O'Connor missed the conversion but he went on to slot his third kick, as the three-time champions booked their place in the knockout stages.
Bath: Anthony Watson; Semesa Rokoduguni, Jonathan Joseph, Kyle Eastmond, Horacio Agulla, George Ford (c), Chris Cook; Nick Auterac, Ross Batty, Henry Thomas; Charlie Ewels, Dominic Day; David Denton, Guy Mercer, Leroy Houston.
Replacements: Tom Dunn, Nathan Catt, David Wilson, Tom Ellis, Matt Garvey, Alafoti Faosiliva, Rhys Priestland, Ollie Devoto.
Toulon: James O'Connor; Josua Tuisova, Maxime Mermoz, Ma'a Nonu, Bryan Habana; Quade Cooper, Sebastien Tillous-Borde; Florian Fresia, Guilhem Guirado, Levan Chilachava; Jocelino Suta (c), Samu Manoa; Juan Smith, Steffon Armitage, Duane Vermeulen.
Replacements: Jean-Charles Orioli, Xavier Chiocci, Manasa Saulo, Mamuka Gorgodze, Romain Taofifenua, Mathieu Bastareaud, Eric Escande, Thibault Lassale.
Ref: John Lacey (Ireland).
For the latest rugby union news follow @bbcrugbyunion on Twitter.

Councillor Emlyn Dole's wife, Gwenda Owen, received permission to partially convert stone barns at Capel Ifan Farm in Pontyberem last year.
But an investigation by planning officers found "substantial demolition of the original building".
Planning committee members will visit the site before making a decision.
A report put before the committee on Thursday also said the proposal has changed from being "a conversion of an existing barn" to a "new building development for business and holiday purposes".
The new structure may have to be removed if retrospective planning permission is refused.
Reigning champions Toulon beat Bath to reach the Champions Cup quarter-finals, but missed out on top spot in Pool Five.
[NEXT_CONCEPT]
A renovated barn belonging to Carmarthenshire council's leader could be removed after being modified beyond planning permission.