The direct production of liquid fuels from CO2 hydrogenation has attracted enormous interest for its significant roles in mitigating CO2 emissions and reducing dependence on petrochemicals. Here we report a highly efficient, stable and multifunctional Na–Fe3O4/HZSM-5 catalyst, which can directly convert CO2 to gasoline-range (C5–C11) hydrocarbons with selectivity up to 78% of all hydrocarbons while only 4% methane at a CO2 conversion of 22% under industrial relevant conditions. It is achieved by a multifunctional catalyst providing three types of active sites (Fe3O4, Fe5C2 and acid sites), which cooperatively catalyse a tandem reaction. More significantly, the appropriate proximity of three types of active sites plays a crucial role in the successive and synergetic catalytic conversion of CO2 to gasoline. The multifunctional catalyst, exhibiting a remarkable stability for 1,000 h on stream, definitely has the potential to be a promising industrial catalyst for CO2 utilization to liquid fuels.