Fortuna Dusseldorf suffered the drop instead after it lost 3-0 at Union Berlin on Sunday (AEST).
After finishing 16th, Werder will now play a two-legged relegation play-off against a team from 2. Bundesliga, most likely to be either Heidenheim or Hamburg.
Consecutive defeats to Bayern Munich and Mainz had Werder on the brink of being relegated for the first time since 1981.
It came into the final day of the regular season two points adrift of Dusseldorf with an inferior goal difference.
But after selecting an attacking line-up, Florian Kohfeldt was rewarded as his side raced into a three-goal lead inside the first half-hour thanks to strikes from Yuya Osako, Milot Rashica and Niclas Fullkrug.
There was a positive half-time update from the Dusseldorf game, with host Union holding a one-goal advantage courtesy of Anthony Ujah.
After the break, Davy Klaassen scored and Osako added a second as Werder moved five goals in front, while the good news kept coming with a second Union goal from Christian Gentner in the other game.
Dominick Drexler scored for Cologne but rampant Werder made it six through substitute Josh Sargent.
With no revival against Union, which added a third thanks to Suleiman Abdullahi, it meant Dusseldorf's second season in the Bundesliga ended in relegation.
It will drop a division with bottom-of-the-table Paderborn, which had its relegation confirmed on 17 June (AEST) after also suffering a defeat against Union.