The escalating threat of natural disasters to public safety worldwide underlines the crucial role of effective environmental risk management tools, such as insurance. This is particularly evident in the case of earthquakes that occurred in Oklahoma between 2011 and 2020, which were linked to wastewater injection, underscoring the need for earthquake insurance. In this regard, from a survey of 812 respondents in Oklahoma, USA, we used supervised machine learning techniques (i.e., logit, ridge, least absolute shrinkage and selection operator (LASSO), decision tree, and random forest classifiers) to identify the factors that influence earthquake insurance uptake and to predict individuals who would acquire earthquake insurance. Our findings reveal that influential factors that affect earthquake insurance uptake include demographic factors such as older age, male gender, race, and ethnicity. These were found to significantly influence the decision to purchase earthquake insurance. Additionally, individuals residing in rental properties were less likely to purchase earthquake insurance, while longer residency in Oklahoma had a positive influence. Past experience of earthquakes was also found to positively influence the decision to purchase earthquake insurance. Both decision trees and random forests demonstrated good predictive capabilities for identifying earthquake insurance uptake. Notably, random forests exhibited higher precision and robustness, emerging as an encouraging choice for earthquake insurance modeling and other classification problems. Empirically, we highlight the importance of insurance as an environmental risk management tool and emphasize the need for awareness and education on earthquake insurance as well as the use of supervised machine learning algorithms for classification problems.