Coal mining in the United Kingdom dates back to Roman times and occurred in many different parts of the country. Britain's coalfields are associated with Northumberland and Durham, North and South Wales, Yorkshire, the Scottish Central Belt, Lancashire, Cumbria, the East and West Midlands and Kent. After 1972, coal mining quickly collapsed and had practically disappeared by the 21st century. The consumption of coal – mostly for electricity – fell from 157 million tonnes in 1970 to 18 million tonnes in 2016, of which 77% (14 million tonnes) was imported from Colombia, Russia, and the United States. Employment in coal mines fell from a peak of 1,191,000 in 1920 to 695,000 in 1956, 247,000 in 1976, 44,000 in 1993, and to 2,000 in 2015.
Almost all onshore coal resources in the UK occur in rocks of the Carboniferous age, some of which extend under the North Sea. Bituminous coal is present in most of Britain's coalfields and is 86% to 88% carbon. In Northern Ireland, there are extensive deposits of lignite which is less energy-dense based on oxidation (combustion) at ordinary combustion temperatures (i.e. for the oxidation of carbon – see fossil fuels).
The last deep coal mine in the UK closed on 18 December 2015. Twenty-six open cast mines still remained in operation at the end of 2015. Banks Mining said in 2018 they planned to start mining a new site in County Durham but in 2020 closed a major open cast site, Bradley mine, near Dipton in the county and the last open cast site then operating in England, Hartington at Staveley, Derbyshire, was expected to close by the end of that year. In 2020 Whitehaven coal mine became the first approved new deep coal mine in the United Kingdom in 30 years.
The United Kingdom's onshore coal resources occur in rocks of the Carboniferous age, some of which extend under the North Sea. The carbon content of the bituminous coal present in most of the coalfields is 86% to 88%. Britain's coalfields are associated with Northumberland and Durham, North and South Wales, Yorkshire, the Scottish Central Belt, Lancashire, Cumbria, the East and West Midlands and Kent.
Stone and Bronze Age flint axes have been discovered embedded in coal, showing that it was mined in Britain before the Roman invasion. Early miners first extracted coal already exposed on the surface and then followed the seams underground.
It is probable that the Romans used outcropping coal when working iron or burning lime for building purposes. Evidence to support these theories comes mostly from ash discovered at excavations of Roman sites.
There is no mention of coal mining in the Domesday Book of 1086 although lead and iron mines are recorded. In the 13th century there are records of coal digging in Durham and Northumberland, Nottinghamshire and Derbyshire, Staffordshire, Lancashire, the Forest of Dean, Prestongrange in Lothian  and North and South Wales. At this time coal was referred to as sea cole, a reference to coal washed ashore on the north east coast of England from either the cliffs or undersea outcrops. As the supply of coal on the surface became used up, settlers followed the seam inland by digging up the shore. Generally the seam continued underground, encouraging the settlers to dig to find coal, the precursor to modern operations.
The early mines would have been drift mines or adits where coal seams outcropped or by shallow bell pits where coal was close to the surface. Shafts lined with tree trunks and branches have been found in Lancashire in workings dating from the early 17th century and by 1750 brick lined shafts to 150 foot depth were common.
Coal production increased dramatically in the 19th century as the Industrial Revolution gathered pace, as a fuel for steam engines such as the Newcomen engine, and later, the Watt steam engine. To produce firewood in the 1860s equivalent in energy terms to domestic consumption of coal would have required 25 million acres of land per year, nearly the entire farmland area of England (26 m acres).
A key development was the invention at Coalbrookdale in the early 18th century of coke which could be used to make pig iron in the blast furnace. The development of the steam locomotive by Trevithick early in the 19th century gave added impetus, and coal consumption grew rapidly as the railway network expanded through the Victorian period. Coal was widely used for domestic heating owing to its low cost and widespread availability. The manufacture of coke also provided coal gas, which could be used for heating and lighting. Most of the workers were children and men.
UK coal production peaked in 1913 at 287 million tonnes. Until the late 1960s, coal was the main source of energy produced in the UK, peaking at 228 million tonnes in 1952. Ninety-five per cent of this came from roughly 1,334 deep-mines that were operational at the time, with the rest from around 92 surface mines.
In the 1950s and 1960s, around a hundred North East coal mines were closed. In March 1968, the last pit in the Black Country closed and pit closures were a regular occurrence in many other areas. Beginning with wildcat action in 1969, the National Union of Mineworkers became increasingly militant, and was successful in gaining increased wages in their strikes in 1972 and 1974. Closures were less common in the 1970s, and new investments were made in sites such as the Selby Coalfield. In early 1984, the Conservative government of Margaret Thatcher announced plans to close 20 coal pits which led to the year-long miners' strike which ended in March 1985. The strike was unsuccessful in stopping the closures and led to an end to the closed shop in British Coal, as the breakaway Union of Democratic Mineworkers was formed by miners who objected to the NUM's handling of the strike. Numerous pit closures followed, and in August 1989 coal mining ended in the Kent coalfield.
In 1986, Kellingley colliery near Pontefract achieved a record 404,000 tonnes in a single shift but nevertheless, since 1981 production fell sharply from 128 to 17.8 million tonnes in 2009.
Between 1947 and 1994, some 950 mines were closed by UK governments. Clement Attlee’s Labour government closed 101 pits between 1947 and 1951; Macmillan (Conservative) closed 246 pits between 1957 and 1963; Wilson (Labour) closed 253 in his two terms in office between 1964 and 1976; Heath (Conservative) closed 26 between 1970 and 1974; and Thatcher (Conservative) closed 115 between 1979 and 1990.
In 1994, then-Prime Minister John Major privatised British Coal after announcing 55  further closures, with the majority of operations transferred to the new company UK Coal. By this time British Coal had closed all but the most economical of coal pits.
The pit closures caused coal production to slump to the lowest rate in more than a century, further declining towards the end of the 1980s and into the 1990s. This coincided with initiatives for cleaner energy generation as power stations switched to gas and biomass. A total of 100 million tons was produced in 1986, but by 1995 the amount was around 50 million tons. The last deep mine in South Wales closed when the coal was exhausted in January 2008. The mine was closed by British Coal in the privatisation of the industry fourteen years earlier and re-opened after being bought by the miners who had worked at the pit.
Following the limitations to the National Union of Mineworkers' power, British coal-dependent industries have turned to cheaper imported coal. In 2001, production was exceeded by imports for the first time. In 2014, coal imported was three times more than the coal mined in Britain, despite large resources in the country. In 2009, companies were licensed to extract 125 million tonnes of coal in operating underground mines and 42 million tonnes at opencast locations.
Coal mining employed 4,000 workers at 30 locations in 2013, extracting 13 million tonnes of coal. The UK Coal mines achieved the most economical coal production in Europe, according to UK Coal, with a level of productivity of 3,200 tonnes per man year as of 2012, at which point there were 13 UK Coal deep mines. The three deep-pit mines were Hatfield and Kellingley Collieries in Yorkshire and Thoresby in Nottinghamshire. There were 26 opencast sites in 2014, mainly in Scotland. Most coal is used for electricity generation and steel-making, with its use for heating homes decreased because of pollution concerns. The commodity is also used for fertilisers, chemicals, plastics, medicines and road surfaces. Hatfield Colliery closed in June 2015, as did Thoresby, and in December 2015, Kellingley, bringing to an end deep coal mining in the UK. The occasion was marked by a rally and march attended by thousands of people. The closure of coal mines left the affected communities economically deprived, unable to recover even in the long run.
In 2020 Whitehaven coal mine became the first approved new deep coal mine in the United Kingdom in 30 years. The plan was criticised by MPs and environmentalists due to the incompatibility of coal mining with government commitments to reduce carbon emissions. The mine is proposed by West Cumbria Mining and plans to extract coking coal from beneath the Irish Sea for 25 years. The Cumbria County Council Development Control and Regulation Committee approved West Cumbria Mining plans for the mine in October 2020 for a third time. In January 2021 Secretary of State Robert Jenrick refused South Lakeland MP Tim Farron's request to call in the plans for review. MP Tim Farron described the coal mine as a "complete disaster for our children's future". Greenpeace UK stated “claims that it will be carbon neutral are like claiming an oil rig is a wind turbine”. In March 2021, it was announced that a public enquiry would be made into the plans to build the coal mine.
The demand for coal is likely to fall with increasing focus on renewable energy or low-carbon sources and loss of industry due to globalisation. Oil and gas reserves are predicted to run out long before coal, so gas could be produced from coal by gasification.
On 21 April 2017, Britain went a full day without using coal power to generate electricity for the first time since the Industrial Revolution, according to the National Grid. In May 2019, Britain went a full week without coal power. Later in the year a new record of 18 days, 6 hours and 10 minutes was set. In 2019, German utilities firm RWE announced that it planned to close all its UK coal power plants by 2020, leaving only four plants operating by March 2020; in 2018, eight were still in operation when the government announced plans to shut down all coal power plants in the UK by 2025.
Earlier this month Maltby colliery in South Yorkshire closed down for good. At the end of a winter that saw 40% of our energy needs met by coal – most of it imported – we witnessed the poignant closing ceremony