Brazilian striker Fred and Portuguese midfielder Tiago scored in the 11th and 31st minutes respectively to finish off the Spanish giants.
Despite the precious victory, Lyon are second in Group E with three points behind Steaua Bucharest who eased to a 4-1 away win over Ukraine's Dynamo Kyiv.
Real Madrid and Dynamo lie third and fourth respectively.
Fred put the hosts in front after he ghosted behind Real's defensive duo Fabio Cannavaro and Sergio Ramos to loop Juninho's brilliant long ball over advancing goalie Iker Casillas
Tiago sealed the victory 20 minutes later when he connected with Sidney Govou's neat pass inside the area and slotted home past the Spain keeper.
In Ukraine, hosts Dynamo Kyiv were handed a humiliating 4-1 defeat by Steaua.
Sorin Ghionea opened the score line as early as the third minute when he headed Vasilica Cristocea's corner-kick into the back of the net.
Sergei Rebrov fired Dynamo back into the game in the 16th minute when he buried the ball past goalkeeper Carlos Alberto Fernandes after a successful give-and-go.
Valentin Badea powered another header home after just eight minutes to restore the lead.
Nicolae Dica added the third just before the break when he curled a venomous shot over the wall and into the back of the net.
Romania's top scorer Dica put the last pin into Dynamo's coffin 11 minutes from time with a superb finish.