Rock mechanical parameters are essential for drilling operation optimization, reservoir health monitoring, and hydrocarbon production. Consequently, achieving high economic revenue from the reservoir is dependent upon an accurate prediction of these parameters. Cohesion and internal friction angle are two important parameters that represent the shear strength of the rock. Several works have been done to predict these two parameters empirically from lab measurement or wireline logging data. In this study, two machine learning (ML) techniques, decision tree (DT) and random forest (RF), were used to build a predictive model using actual well logging data of two wells. The input data include compressional time (DTC), bulk density (ROHB), and neutron porosity (NPHI), as the sensitivity analysis showed that friction angle and cohesion are more sensitive to this input than the other logging parameters. The first well data set was used to train and test the model, while another set of 635 data points from different well was used for the model validation. The model accuracy was measured using the correlation coefficient (R), and the absolute average percentage error (AAPE), in addition to the failure parameter profiles. The result indicated the high accuracy of the two models in the prediction as the DT model recorded an R-value greater than 0.98 and 0.96 and an AAPE less than 2% and 3% for friction angle and cohesion, respectively, while the RF model showed its outperformance with R values 0.99 and 0.97 and AAPE values less than 1% and 2.5% for the two parameters respectively. The validation set confirmed the accuracy of the two models in generating a complete accurate profile of the friction angle and cohesion, as the DT model’s R values were calculated at 0.96 and 0.95 and AAPE of 1.6% and 3.3% for friction angle and cohesion, respectively. On the other hand, the RF model showed its better accuracy with R values of 0.97 and 0.96, while the AAPE values were 1.2% and 2.5% for friction angle and cohesion respectively. The obtained results confirmed the high accuracy and the robustness of these techniques in predicting the friction angle and cohesion; in addition, these methods are several times faster for field applications.