He commenced his political career by being elected Liberal Member of Parliament for the Scottish seat of Edinburghshire. This was a county, better known by its modern name of Midlothian, which was an area where the Roseberys had long been prominent landowners. Dalmeny was one of almost 400 Liberals returned in the great landslide victory of the 1906 election. He retired from the House of Commons in January 1910. At the time of his death he was the last survivor of the 1906 Liberal MPs.