That’s what they’re doing at Los Alamos National Laboratory, according to the New York Times. Zap CO2 and H2O from the atmosphere with electricity and the air itself becomes petroleum:
This plan has a minor hurdle, too; the electricity for driving the chemical processes, according to a white paper describing the overarching concept, would come from nuclear power. [...]