Freiburg will return to the Europa League for the first time in over a decade despite suffering defeat at home.
Julian Draxler gave the Royal Blues the lead in the 20th minute of a tense opening half in which neither side appeared keen to take any risks.
Freiburg had to open up more in the second half and they got their reward through Jonathan Schmid, but a comedy of errors in defence soon led to Julian Schuster putting through his own goal to gift Schalke the victory.
Freiburg needed to win to climb above their opponents and they took the initiative early on by holding on to possession.
Schalke, who were assured of fourth place even with a draw, appeared happy enough just to soak up the pressure and wait for their chance.
That arrived in the 20th minute when Jefferson Farfan and Klaas-Jan Huntelaar combined to set up Draxler, who picked his spot from 20 yards and found the far corner.
The Dreisamstadion crowd fell silent with two goals now needed to keep the home side's dream of Champions League football alive.
They got one early in the second half when Jan Rosenthal's shot was only parried by Timo Hildebrand and Schmid slotted the loose ball in.
But less than two minutes passed before Schalke regained the lead to effectively finish Freiburg off.
Jermaine Jones' shot was not on target, but Immanuel Hohn got caught in two minds and his attempted clearance hit his own team-mate, Schuster, to cannon in for Schalke's second.
Freiburg tried to respond, but Schalke dug in to seal the win and their place in the Champions League, leaving Freiburg with the consolation of fifth place and a Europa League berth.