Most of the damage was done in a sensational 11-minute spell early in the first half when Emre Can struck twice against the Bundesliga side and Mohamed Salah also got on the scoresheet.
Mark Uth, who scored and missed a penalty in the first leg, pulled one back for the visitors but the outstanding Roberto Firmino settled the tie before a Sandro Wagner consolation.
“We wanted a fast start and we have fulfilled our dream. It was fantastic,” Liverpool manager Jurgen Klopp said.
“I do not have enough words it is amazing. It is 14 months of the hardest work and it feels amazing. I can’t find another word.
“Playing Hoffenheim was the most difficult draw, alongside Napoli, we had two unbelievably hard games. We learned from the first game and adapted to a little change when they changed from five at the back to four at the back.
“We are really excited about the group stage, whoever we get.
“There will be a few nice and difficult opponents but no-one with this atmosphere wants to get us. I’m really looking forward to the draw.
“Now I’ve told the boys to party. Enjoy it!”
Klopp had warned against complacency ahead of the clash but the five-times European champions were never threatened.
They made a blistering start with Alberto Moreno and Salah going close in the opening minutes and Mane having an effort blocked by goalkeeper Oliver Baumann.
It took just 10 minutes for the Reds to find the net as Firmino released Mane and his backheel played Can in on goal. The German’s shot found the net with the aid of a deflection.
The hosts doubled their lead after Firmino pulled the ball back and Salah was left with a simple tap-in after Georginio Wijnaldum’s shot came back off the post.
A third goal quickly followed after Mane again burst clear and wrong-footed the Hoffenheim defence with another backheel, this time finding Firmino. The Brazilian looked up and picked out Can with a cross to the back post and the finish was composed.
Leading 3-0 after 21 minutes, the Reds were rampant but they were checked when Uth, an early replacement for Havard Nordtveit, beat Simon Mignolet with a low shot across goal.
Serge Gnabry, formerly of Arsenal, also struck a fierce shot narrowly wide.
A moment of uneasiness from Mignolet aside, Liverpool looked sharp again at the start of the second half.
Wijnaldum went through on goal only to be denied by the shoulder of Baumann, who then pushed away a strong drive from Mane.
The fourth goal came as Reds captain Jordan Henderson robbed his opposite number Kevin Vogt and powered on towards the box just after the hour.
Unselfishly, he then played in Firmino and the forward made no mistake.
That ensured Liverpool’s place in the group stages for the first time since 2014-15 was secure, but it was not quite the end of the action.
Mignolet had to stretch to keep out a deflected shot from Kerim Demirbay and Hoffenheim grabbed another consolation when former Leicester forward Andrej Kramaric teed up a header for Wagner.
Last night’s result ensured England will be represented by five teams when the draw for the group stages is made today.
Chelsea, Tottenham, Manchester City, Manchester United, and Liverpool will learn their group stage opposition this afternoon.
The draw for the eight groups, featuring 32 teams in all, begins at 5pm at the Grimaldi Forum in the Principality. It will be followed by the Uefa Player Awards.
Premier League champions Chelsea are in pot one alongside Madrid, Bayern Munich, Juventus, Benfica, Shakhtar Donetsk, Monaco, and Spartak Moscow.
The Blues, the 2012 winners, return after a season’s absence after winning the English title under Antonio Conte.
Manchester United are back after winning the Europa League under Jose Mourinho, a Champions League winner in 2004 with Porto and 2010 with Inter Milan.
United, who were knocked out of the Champions League at the group stage in 2015-16, are in pot two alongside City, Barcelona, Atletico Madrid, Paris St Germain, Borussia Dortmund, Sevilla and Porto.
Spurs and Liverpool are in pot three, with Napoli, Basle, Olympiacos, Anderlecht, Roma and Besiktas.
Mignolet, Alexander-Arnold (Gomez 64), Matip, Lovren, Moreno, Can (Milner 69), Henderson, Wijnaldum, Salah, Firmino, Mane (Klavan 87).
Baumann, Kaderabek (Toljan 64), Nordtveit (Uth 24), Vogt, Hubner, Zuber, Geiger, Demirbay, Kramaric, Wagner, Gnabry (Szalai 56).
Daniele Orsato (Italy)