a system or method for producing gasoline or dimethyl ether from natural gas via methanol includes : steam - reforming natural gas to generate reformed gas ; synthesizing methanol from the reformed gas ; synthesizing gasoline or dimethyl ether from the methanol ; and at least one is selected from the group consisting of : pre - reforming natural gas prior to the steam - reforming ; recovering carbon dioxide from flue gas generated in the steam - reforming ; and preheating combustion air to be supplied to the steam - reforming by using synthesis heat generated in the synthesis of gasoline or dimethyl ether . in addition , an overall energy balance of the system is constructed by using heat recovery from flue gas generated in the steam - reforming , heat recovery from the reformed gas , synthesis heat generated in the synthesis of methanol , synthesis heat generated in the synthesis of gasoline or dme , and heat recovered in the pre - reforming , carbon dioxide recovering , or air preheating , respectively if selected .