Under his predecessor Wellington, he was made Home Secretary. When Wellington retired William IV in 1834, selected Melbourne as prime minister. However after 121 days William IV decided to replace him with Robert Peel. When Peel resigned Melbourne returned in 1835.
William IV died in 1837, he was succeeded by his niece Queen Victoria. The Queen sought the prime minster for his advice and installed him as prime minister. However when Queen Victoria married Albert in 1840, she no longer needed Melbourne to guide her. In 1841 he called a general election, which he ultimately lost and therefore resigned. He had a stroke within a year of resigning and suffered poor health until his death in 1848.