Ishak Belfodil scored a goal as Hoffenheim suffered a 4-2 defeat to Mainz in their last Bundesliga game of the season.
Belfodil broke the deadlock at the Opel Arena in the 12th minute to put Julian Nagelsmann's side ahead.
The effort extended the 27-year-old's tally to 16 goals after 28 league outings in his debut season with Die Kraichgauer.
Andrej Kramaric doubled the lead for the visitors in the 32nd minute but they failed to protect it after the restart.
Daniel Brosinski's effort from the penalty spot in the 66th minute inspired Mainz 05's comeback as Jean Boetius' double and Jean Mateta's goal in the closing stages completed the comeback.