The two sides met in last season's Third Qualifying Round, Celtic winning 3-2 on aggregate.
The first leg match of the play-off stage will be held either on August 15 of 16 and the second leg will be played on August 22 or 23.
Now they face a long journey for the away leg of their playoff round tie as FC Astana provide the opposition.
Should Hoffenheim make it through, they will learn their Champions League group opponents on Thursday 24 August. They have a lot of really good young players.
Liverpool open their league campaign against Watford on August 12 and will face the first leg of their playoff against Hoffenheim on either August 15 or 16.
Towering centre back Niklas Sule and midfield playmaker Sebastian Rudy both agreed to join Bayern midway through last season and they will both be extremely hard to replace.
Nagelsmann is quoted by the Liverpool Echo as saying: "This morning I joked by saying "if you want to lift the trophy you also have to overcome Liverpool" as I felt it would be Liverpool".
"We need to be independent of one or two players", he said. I had a feeling it would be Liverpool and I think it's a great thing for both our fans and the media. I believe they would not have necessarily picked us as their opponents.
"Liverpool is an outstanding team, Bayern Munich was unimpressive".
Liverpool were denied a meeting with Mario Balotelli's Nice, who had the toughest draw in landing Napoli, but will be wary of an impressive Hoffenheim outfit.
- Wembley test for Chelsea, Arsenal after tough offseason
- Samsung Galaxy S8 Active accidentally confirmed by AT&T?
- Vice President Election 2017: Voting underway
- Coordinating with Bhutan on Dokalam issue
- Neymar Explains The Reasons Why He Chose Paris Saint-Germain
- Sales tax free weekend in Virginia is August 4
- Chidambaram hits out at BJP for attack on Rahul
- White House leaks are 'threatening national security', Jeff Sessions says
- Special counsel Robert Mueller impanels grand jury as Trump-Russia investigation accelerates
- Jay Cutler Unlikely to Join Miami Dolphins