The eldest son of Robert Dundas, 2nd Viscount Melville, he became a general in the army, and played a distinguished part in the second Sikh War.