The Reds feature in Group E, alongside Spanish side, Sevilla, Russian champion Spartak Moscow, and Slovenian side, Maribor.
Premier League runners-up, Tottenham, were handed a horrid group, drawing reigning champions, Real Madrid and Borussia Dortmund, as well as Cypriot side, APOEL FC.
Premier League champions, Chelsea also have a difficult group, drawing Atletico Madrid and Roma.
Matchday one of the Champions League will be held on September 12 and 13.
Group A: Benfica, Manchester United, Basel, CSKA Moscow
Group B: Bayern Munich, PSG, Anderlecht, Celtic
Group C: Chelsea, Atletico Madrid, AS Roma, Qarabag
Group D: Juventus, Barcelona, Olympiakos, Sporting Lisbon
Group E: Spartak Moscow, Sevilla, Liverpool, Maribor
Group F: Shakhtar Donetsk, Manchester City, Napoli, Feyenoord
Group G: AS Monaco, Porto, Besiktas, RB Leipzig
Group H: Real Madrid, Borussia Dortmund, Tottenham Hotspur, APOEL