ABSTRACT Due to travel restrictions and the general economic slowdown caused by the Coronavirus Disease 2019 (COVID-19), the gasoline consumption profile has exhibited unusual behavior. Depending on the severity of lockdown policies, the consumption pattern has changed even at different stages of the epidemic. Forecasting gasoline demand has become a more difficult and essential tool for energy planning. Therefore, reliable models are needed to ensure energy security in pandemic conditions. Presenting a case study on Turkey, this paper investigates the impact of the COVID-19 pandemic on gasoline demand. Four common machine learning models, including Gaussian Process Regression, Sequential Minimal Optimization Regression, Multi-Layer Perceptron Regressor, and Random Forest, were used to estimate daily gasoline consumption. In the training of the models, inputs such as historical gasoline demand, national holidays, date attributes, gasoline price, and COVID-19 related factors such as curfews and travel bans were considered. Analysis results showed that the Random Forest model performed best with the highest correlation coefficient (0.959) and the lowest mean absolute percentage error (11.526%), and root mean square percentage error (17.022%) values in the test dataset. This study can help policymakers understand the impact of such an emergency on the energy industry and respond quickly to potential threats.