Due to the extraordinary impact of the Coronavirus Disease 2019 and the resulting lockdown measures, the demand for energy in business and industry has dropped significantly. This change in demand makes it difficult to manage energy generation, especially electricity production and delivery. Thus, reliable models are needed to continue safe, secure, and reliable power.An accurate forecast of electricity demand is essential for making a reliable decision in strategic planning and investments in the future. This study presents the extensive effects of COVID-19 on the electricity sector and aims to predict electricity demand accurately during the lockdown period in Turkey. For this purpose, well-known machine learning algorithms such as Gaussian process regression (GPR), sequential minimal optimization regression (SMOReg), correlated Nyström views (XNV), linear regression (LR), reduced error pruning tree (REPTree), and M5P model tree (M5P) were used. The SMOReg algorithm performed best with the lowest mean absolute percentage error (3.6851%), mean absolute error (21.9590), root mean square error (29.7358), and root relative squared error (36.5556%) values in the test dataset. This study can help policy-makers develop appropriate policies to control the harms of not only the current pandemic crisis but also an unforeseeable crisis.