William Lamb, 2nd Viscount Melbourne (15 March 1779 – 24 November 1848) was a British Whig statesman who served as Home Secretary (1830–1834) and Prime Minister (1834 and 1835–1841). He is best known for his intense and successful mentoring of Queen Victoria, at ages 18–21, in the ways of politics. Historians conclude that Melbourne does not rank high as a prime minister, for there were no great foreign wars or domestic issues to handle, he lacked major achievements and enunciated no grand principles. "But he was kind, honest, and not self-seeking."
Born in London to an aristocratic Whig family, son of Sir Penniston Lamb and Elizabeth Milbanke Lamb, Viscountess Melbourne (1751–1818), though his paternity was questioned. He was educated at Eton and Trinity College, Cambridge, he fell in with a group of Romantic Radicals that included Percy Bysshe Shelley and Lord Byron. In 1805 he succeeded his elder brother as heir to his father's title and he married Lady Caroline Ponsonby. The next year he was elected to the British House of Commons as the Whig MP for Leominster. For the election in 1806 he was moved to the seat of Haddington burghs and for the 1807 election successfully stood for Portarlington (a seat he held until 1812).
He first came to general notice for reasons he would rather have avoided: his wife had a public affair with Lord Byron—she coined the famous characterisation of him as "mad, bad, and dangerous to know". The resulting scandal was the talk of Britain in 1812. Eventually the two reconciled and though they separated in 1825, her death in 1828 affected him considerably.
In 1816 Lamb was returned for Peterborough by Whig grandee Lord Fitzwilliam. He told Lord Holland that he was committed to the Whig principles of the Glorious Revolution but not to "a heap of modern additions, interpolations, facts and fictions". He therefore spoke against parliamentary reform and voted for the suspension of habeas corpus in 1817 when sedition was rife.
Lamb's hallmark was finding the middle ground. Though a Whig, he accepted (29 April 1827) the post of Chief Secretary for Ireland in the moderate Tory governments of George Canning and Lord Goderich. Upon the death of his father in 1828 and his becoming Viscount Melbourne, he moved to the House of Lords. He had spent 25 years in Commons as a backbencher and politically was not well known.