Blasting is a cost-effective technique to break hard rock volumes by using explosives in the mining and civil engineering realms. Moreover, although blasting is a designed process and plays an indispensable role in these industries, it can also have multiple adverse environmental impacts. One such effect is flyrock, which poses risks to nearby machinery, and residential structures, and can even lead to injuries or fatalities. To optimize blasting efficiency as well as restrict side effects, prediction of the blast aftereffects is vital. Therefore, the present work focuses on using two machine learning methods to predict the velocity of flyrock in the open pit mine. To address this issue, a comprehensive dataset was gathered from the open pit mine. Then, Decision Tree and Random Forest algorithms were employed to predict flyrock velocity. The Random Forest model demonstrated superior performance compared to the Decision Tree model. Nonetheless, the performance of the Decision Tree model was deemed satisfactory, as evidenced by its coefficient of determination value of 0.83, mean squared error (MSE) of 4.2, and mean absolute percentage error (MAPE) of 5.6%. Considering these metrics, it is reasonable to conclude that tree-based algorithms can be effective in predicting flyrock velocity.