Midlothian (; Scottish Gaelic: Meadhan Lodainn) is a historic county, registration county, lieutenancy area and one of 32 council areas of Scotland used for local government. Midlothian lies in the east-central Lowlands, bordering the City of Edinburgh, East Lothian and the Scottish Borders.
Midlothian emerged as a county in the Middle Ages under larger boundaries than the modern council area, including Edinburgh itself – and also known as Edinburghshire until 1921. It bordered West Lothian to the west, Lanarkshire, Peeblesshire and Selkirkshire to the south, and East Lothian, Berwickshire and Roxburghshire to the east. Traditional industries included mining, agriculture and fishing – although the modern council area is now landlocked.
Under local government reforms in 1975, Midlothian became a district council within the Lothian region and in 1996 the current unitary council area was created. It contains the towns of Dalkeith, Bonnyrigg and Penicuik, as well as a portion of the Pentland Hills Regional Park, Rosslyn Chapel and Dalkeith Palace.