Vienna General Hospital in Austria said in a statement that 69-year-old Lauda had been suffering from “severe lung condition”. It added “the transplant was carried out successfully”.
Lauda is non-executive chairman of Mercedes and won the Formula 1 drivers’ championship in 1975 and 1977 with Ferrari and again in 1984 with McLaren.
In 1976, he was badly burned when he crashed during the German Grand Prix, but returned to racing just six weeks later.
Mercedes Team Principal Toto Wolff said in a statement: "Although we should enjoy the start of our summer holidays this evening, none of us at Mercedes will pretend that we feel happy - our thoughts are rather with Niki, Birgit and the Lauda family.
"The world knows Niki as an F1 legend with incredible power and resilience. For all of us at Mercedes he is our chairman, our mentor and our friend.
"We have missed him by our side in Hockenheim and Hungary, and can’t wait to have him back with us on the Grand Prix tracks of this world.
"The recovery he now faces is not a race. But knowing Niki, I’m sure he will soon be telling every nurse and doctor that he has had enough of the hospital.
"We wish him a safe and speedy recovery - in that order - and send all our positive energy to him and his family. I miss you my friend."