Across the weekend, there was speculation Prime Minister Boris Johnson was planning to bring the ban forward, which has now been confirmed.
Johnson has unveiled his 10-point plan to combat climate change, which includes a ban on the sale of diesel and petrol cars by 2030 - a decade sooner than the original date of 2040.
In the UK at the moment, fewer than one percent of cars are powered entirely by electricity and this is something Johnson wants to change.
The government has said it will allow the sale of hybrid cars that 'can drive a significant distance with no carbon coming out of the tailpipe until 2035'.
The UK has a target of emitting virtually zero carbon by 2050 - something the new plans hope to help it achieve.
The 10-points are:
- Offshore wind: producing enough offshore wind to power every home by 2030, which will also create 60,000 jobs.
- Hydrogen: generating 5GW of low carbon hydrogen production capacity by 2030 and developing the first town heated entirely by hydrogen by the end of the decade.
- Nuclear: developing the next generation of small and advanced reactors, which could make 10,000 jobs.
- Electric vehicles: backing car manufacturing bases in the UK to help speed up the transition to electric cars - as well as the aforementioned ban on selling petrol and diesel cars by 2030.
- Public transport, cycling and walking: making cycling and walking 'more attractive ways to travel' and investing in zero-emission public transport going forward.
- Jet Zero and greener maritime: a commitment to support 'difficult-to-decarbonise' industries to become more green.
- Home and public buildings: making homes, schools and hospitals greener, warmer and more energy efficient while creating 50,000 jobs by 2030.
- Carbon capture: becoming a 'world-leader' in technology to capture and store harmful emissions away from the atmosphere.
- Nature: protecting and restoring our natural environment, planting 30,000 hectares of trees.
- Innovation and finance: developing 'cutting edge technologies' to help make the City of London the world's centre of 'green finance'.
Announcing the plans, Johnson said: "Although this year has taken a very different path to the one we expected, I haven't lost sight of our ambitious plans to level up across the country.
"My Ten Point Plan will create, support and protect hundreds of thousands of green jobs, whilst making strides towards net zero by 2050.
"Our green industrial revolution will be powered by the wind turbines of Scotland and the North East, propelled by the electric vehicles made in the Midlands and advanced by the latest technologies developed in Wales, so we can look ahead to a more prosperous, greener future."