Yossi Benayoun was Liverpool's match-winner with a late goal, while Didier Drogba gave Chelsea a slender advantage to take to Italy in a fortnight's time.
Elsewhere in Europe, Sporting were crushed 5-0 at home by Bayern Munich, while Villarreal and Panathinaikos played out a 1-1 draw.
The build-up to Liverpool's match at the Santiago Bernabeu had been overshadowed by speculation surrounding the future of manager Rafa Benitez, with some reports suggesting his days in the club could be numbered.
If the players had been distracted by such stories it did not show in the early exchanges as they frustrated Real Madrid with a disciplined, defensive performance and restricted their more creative players to ambitious shots from distance.
With Steven Gerrard starting on the bench in his first game back following injury, Liverpool looked far from threatening themselves, although Iker Casillas pulled off a fine save to thwart Fernando Torres and then had to scramble back to push a Xabi Alonso effort from 50 yards over the crossbar.
Juande Ramos' side continued to enjoy plenty of possession after the break but they were unable to make the breakthrough as Jose Reina parried away a fierce drive from Arjen Robben.
A goalless draw appeared to be on the cards until an unmarked Benayoun headed home a crucial away goal from Fabio Aurelio's free-kick in the 82nd minute.
Chelsea's clash with Juventus, the third Anglo-Italian affair of the week, saw Claudio Ranieri make an emotional return to Stamford Bridge almost five years after he became the first manager to be sacked in the Roman Abramovich era.
Champions League glory has continued to elude the Blues since Ranieri's departure but Guus Hiddink was given the perfect start to his first European match in charge as Didier Drogba scored in the 12th minute after being found in the box by an exquisite Salomon Kalou pass that bisected Juve's much-vaunted defence.
Drogba was a constant menace throughout the evening with his power and pace, but the Ivory Coast international was unhappy when his claims for a penalty were ignored midway through the second half.
Juventus applied more pressure in the closing stages but Chelsea held firm to go into the second leg as slight favourites.
Bayern Munich were the big winners of the night as they took total control of their tie against Sporting by hitting five in Portugal.
Bayern, the last German side standing in the competition, withstood a 40-minute onslaught from Sporting and then took the lead against the run of play when Franck Ribery seized on a poor pass by Derlei to run from the halfway line, beat two defenders and fire a shot past Tiago.
Miroslav Klose then bundled the ball home from Massimo Oddo's cross on 57 minutes to make it 2-0 and Ribery added a third from the penalty spot after a wild challenge by former Middlesbrough midfielder Fabio Rochemback on Philipp Lahm.
Luca Toni's looping header put Bayern 4-0 in front and the Italian grabbed his second on 90 minutes to complete a miserable night for the hosts.
Sporting will need to stage a monumental fightback to progress to the quarter-finals but the final tie of the evening remains very much in the balance after Villarreal came from behind to hold Panathinaikos.
Panathinaikos, who finished above Inter Milan as they qualified from the group phase, were almost gifted a goal in the first half as Diego Lopez caught a Giorgos Karagounis free-kick and very nearly stepped behind the goal-line.
Karagounis was not to be denied though and he broke the deadlock in stunning fashion on 59 minutes as he sent a powerful, swerving volley into the top corner.
Villarreal had dominated the match for long periods and they shook off the disappointment to draw level thanks to a Giuseppe Rossi penalty in the 67th minute after Robert Pires had been brought down by Jakub Wawrzyniak.