The Liberal Democrat leader, Sir Menzies Campbell, and the party’s environment spokesman, Chris Huhne, unveiled the proposal today as part of a package of measures designed to make Britain carbon-neutral by 2050.
Mr Huhne said he foresaw cars powered by hydrogen fuel cells, improved battery technology or other new technology yet to be developed.
He compared the change to the shift from the steam engine to the internal combustion engine, or from the gaslight to electric light, at the start of the 20th century.
"We need – by 2040 – to have a non-carbon emitting type of propulsion in our vehicles," he said. "It will be clearly no petrol cars by 2040."
The 10-point plan on climate change also included a commitment to 100% carbon-free non-nuclear generation by 2050 and the introduction of "polluter pays" green taxes.
Sir Menzies said: "Pollution doesn’t respect national boundaries. Climate change is a global problem that requires an international solution.
Other Lib Dem proposals include major improvements to the rail network and the construction of a high-speed rail line, funded by tolling lorries on motorways.