Last season's fourth-placed sides in the Premier League and Bundesliga respectively will meet over two legs as they try to claim a place in the group stages of the competition.
Liverpool will begin as favourites but Nagelsmann has hinted that he and his players will be ready for the Merseyside giants when they stage the first leg on either August 15 or 16.
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.
"They're definitely not jumping for joy in Liverpool due to the draw. It's great for the awareness of our club that this draw will bring us fully into the spotlight.
"This is somehow Murphy's Law. Luckily, I've been looking at it this week at the Audi Cup. These were two very good games. It is, of course, a very difficult team, but there was no real easy draw anyway. We can play against a great opponent in a legendary stadium. This is something special."
Hoffenheim have never qualified for the group stages of the Champions League, although they have featured in the Europa League.