The cross-party amendment to the Immigration Bill was backed by 242 votes to 180, majority 62, as peers hit out at a policy "used by tyrants and dictators".
The defeat was the second of a bruising day for ministers in the Lords after peers earlier pushed for the appointment of guardians to help children who had been trafficked.
Under the government's plans, Home Secretary Theresa May would have been able to remove the citizenship of a naturalised Briton who had acted in a way "seriously prejudicial to the vital interests" of the country. At present citizenship can only be removed if the person will not be left stateless.
Lord Pannick, a leading QC and independent crossbencher, put forward the successful amendment, which will remove the provision from the Bill and instead set up a joint committee of MPs and peers to decide whether such powers are necessary. He said: "There are regrettably all too many dictators around the world willing to use the creation of statelessness as a weapon against opponents."
Labour peer Baroness Kennedy of The Shaws, a leading QC, described leaving someone stateless as "repugnant".