The main purpose of this research is to apply the logistic regression (LR) model, the support vector machine (SVM) model based on radial basis function, the random forest (RF) model, and the coupled model of the whale optimization algorithm (WOA) and genetic algorithm (GA) with RF, to make landslide susceptibility mapping for the Ankang City of Shaanxi Province, China. To this end, a landslide inventory map consisting of 4278 identified landslides is randomly divided into training and test landslides in a ratio of 7 : 3. The 15 landslide influencing factors are selected as follows: slope aspect, slope degree, elevation, terrain curvature, plane curvature, profile curvature, surface roughness, distance to faults, distance to roads, landform, lithology, distance to rivers, rainfall, stream power index (SPI), and normalized difference vegetation index (NDVI), and the potential multicollinearity problem among these factors is detected by Pearson correlation coefficient (PCC), variance inflation factor (VIF), and tolerance (TOL). We evaluate the performance of the model separately by statistical training and test dataset metrics, including sensitivity, specificity, accuracy, kappa, mean absolute error (MSE), root mean square error (RMSE), and area under the receiver operating characteristic curve. The training success rates of LR, SVM, RF, WOA-RF, and GA-RF models are 0.7546, 0.8317, 0.8561, 0.8804, and 0.8957; the testing success rates are 0.7551, 0.8375, 0.8395, 0.8348, and 0.85007. The results show that the GA significantly improves the predictive power of the RF model. This study provides a scientific reference for disaster prevention and control in this area and its surrounding areas.