Five-times European champions Liverpool will face ten-times winners face Real as well as Basel and Ludogorets - the Bulgarian side who had a fairy-tale win in the play-offs - in Group B while there was a familiar look to the draw for the three other English sides.
Manchester City have perhaps the toughest group - they will face Bayern Munich for the third time in four years - plus CSKA Moscow and Roma in Group E, while Arsenal will play Borussia Dortmund for the second year running as well as Galatasaray and Anderlecht in Group D
In Group G, Chelsea will play German side Schalke for the second consecutive season plus Sporting Lisbon and Maribor.
Real Madrid may be a daunting prospect for Brendan Rodgers' side, but Liverpool beat the Spanish giants 5-0 on aggregate in 2009 including a 4-0 hammering at Anfield.
Barcelona and Paris Saint-Germain will be the favourites to advance from Group F, where they were drawn with Ajax and APOEL from Cyprus, while last season's beaten finalists Atletico Madrid are in Group A with Juventus, Olympiacos and Malmo.
2014/15 UEFA Champions League draw
Group A: Atletico Madrid, Juventus, Olympiacos, Malmo
Group B: Real Madrid, FC Basel, Liverpool, Ludogorets
Group C: Benfica, Zenit St. Petersburg, Bayer Leverkusen, Monaco
Group D: Arsenal, Borussia Dortmund, Galatasaray, Anderlecht
Group E: Bayern Munich, Manchester City, CSKA Moscow, Roma
Group F: Barcelona, Paris Saint-Germain, Ajax, Apoel Nicosia
Group G: Chelsea, Schalke, Sporting CP, Maribor
Group H: FC Porto, Shakhtar Donetsk, Atheltic Club, BATE Borisov