Like Torino says, it depends where you get that energy from.
Yes, digging up oil is stupid.
However, take a coal fired power station of 500MW, and 35% efficiency...there's 900MW of waste heat somewhere in the system that (may) be able to do some good, if the technology can be found to lower reaction energies (catalysts) such that this low grade heat can be put to work..no laws of physics broken.
I like the idea way more than the 200 plus 500 MW units that would have to be built just to replace the US daily petrol consumption with EVs.