Born in London in 1779 to an aristocratic Whig family, William Lamb was the son of the 1st Viscount Melbourne and Elizabeth, Viscountess Melbourne (1751–1818). However, his paternity was questioned, being attributed to George Wyndham, 3rd Earl of Egremont, to whom it was considered he bore a considerable resemblance, and at whose residence, Petworth, Lamb was a visitor until the Earl's death; Lamb was called to Egremont's bedside when Egremont was dying. Lamb nevertheless stated that Egremont being his father was 'all a lie'.