Edinburghshire (also known as Midlothian) was a county constituency of the House of Commons of the Parliament of Great Britain (at Westminster) from 1708 to 1801 and of the Parliament of the United Kingdom (also at Westminster) from 1801 to 1918.
The seat is most famous as the location of William Gladstone's upset victory in the Midlothian Campaign of 1880. After Gladstone's victory it became the first non-English constituency to be represented by a serving prime minister.
As first used, in 1708 general election of the Parliament of Great Britain, the constituency covered the county of Edinburgh, except the burgh of Edinburgh, which was covered by the Edinburgh burgh constituency. 1708 boundaries were used also for all subsequent elections of that parliament.
In 1801 the Parliament of Ireland was merged with the Parliament of Great Britain to form the Parliament of the United Kingdom . The first general election of the new parliament was the general election of 1802. There was no change to the boundaries of any pre-existing Westminster constituency, and 1802 boundaries were used also in the general elections of 1806, 1807, 1812, 1818, 1820, 1826, 1830 and 1831.
For the 1832 general election, as a result of the Representation of the People Act 1832, the constituency was redefined. The boundaries of counties and burghs for parliamentary purposes ceased to be necessarily those for other purposes, but nominally the Edinburghshire constituency constisted of the county of Edinburgh minus the burghs of Edinburgh, Leith, Portobello, and Musselburgh. Edinburgh was again covered by the Edingurgh constituency, and Leith, Portobello and Musselburgh were covered by the Leith Burghs constituency.
For the 1918 general election, as a result of the Representation of the People Act 1918, the area of the Edinburghshire constituency was mostly divided between the Midlothian and Peebles Northern and Peebles and Southern constituencies. By this date, the county of Edinburgh had been renamed as the county of Midlothian.
The Midlothian and Peebles Northern constituency consisted of the Calder and Suburban districts and part of the Lasswade district of the county of Midlothian, and the Peebles and Southern constituency consisted of the county of Peebles, the Gala Water district and part of the Lasswade district of county of Midlothian, and the burghs of Bonnyrigg, Lasswade, and Penicuik in county of Midlothian.
General Election 1885: William Ewart Gladstone elected unopposed.
At a bye-election in February 1886, Gladstone having accepted office as Prime Minister, he was returned unopposed.