Hazard assessment of sudden geological disasters is of great significance for disaster prevention and risk management. Due to different factors affecting the occurrence of disasters in different regions, it is difficult to select appropriate factors comprehensively and objectively in an actual evaluation process. Machine learning has unique advantages in dealing with high-dimensional nonlinear problems of disaster systems, but its evaluation performance is limited because the model is difficult to tune. This paper attempted to propose a two-way optimization method for landslide hazard assessment. Based on a factor sensitivity index built for quantitative sensitivity analysis, combining importance analysis, correlation analysis, and collinearity analysis, and following the principle of “guarantee sensitivity, retain importance, eliminate correlation, and avoid collinearity", a four-dimensional (4D) feature screening method was constructed to evaluate the comprehensive optimization of factors. In order to overcome the problem that the model is difficult to tune, the Differential Evolution (DE) algorithm was further introduced. Two machine learning models with strong generalization ability, i.e., Support Vector Machine (SVM) and Multi-Layer Perceptron (MLP), were optimized. Finally, we took the landslide in Fujian Province as an example to verify the proposed evaluation method. We found that the 4D feature screening method can more objectively and comprehensively select suitable hazard assessment factors, thereby reducing the data dimension and reducing information redundancy to improve the performance of the assessment model. Ten suitability assessment factors were finally used for landslide hazard assessment in Fujian Province including aspect, variance coefficient in elevation, land use type, average annual rainfall, surface cutting depth, distance to river, distance to road, engineering geological rock group, topographic wetness index, and stream power index. The DE algorithm can obtain better hyperparameters from global search and has a significant optimization effect on SVM and MLP, which is beneficial to improve the evaluation accuracy of the landslide hazard of the model. Compared with the unoptimized models, the AUC values of DE-SVM and DE-MLP increased by 4.43% and 4.37%, respectively. The results of landslide hazard assessment based on two-way optimization show that rainfall and land use types have an important impact on the occurrence of landslides in Fujian Province. Terrain curvature elements, terrain variability elements, and fault structures have little impact on landslide occurrence. The extremely high-hazard areas generally have high annual rainfall and complex and changeful terrain. The extremely low-hazard areas are mainly located along the southeast coast and on both sides of the Minjiang River Basin. This research provides some ideas for objective selection of influencing factors in landslide hazard assessment and machine learning model tuning.