The Reds win the tie 6-3, which sends them through to the group stage for the first time since 2015.
Emre Can got the Reds off the mark after ten minutes following Sadio Mane's instinctive back heel, which allowed the German to take a touch and before striking it past Oliver Baumann.
Salah further eased the nerves at Anfield when he doubled the Reds advantage eight minutes later. The Egyptian scored his first European goal for his new club when he anticipated Georginio Wijnaldum's shot that crashed off the post.
If the Cop faithful weren't relaxed yet, Can changed that only three minutes later when he made it 3-0 after Firmino set him up inside the box.
Reds manager Jurgen Kopp was visibly furious when once again sloppy defending allowed Hoffenheim to score another goal through Sandro Wagner, however, it was all too late for Julian Nagelsmann's side.
The Champions League group stage draw with take place on Thursday early evening UK time.