Internet of things (IoT) and artificial intelligence provide more and more solutions to the exercise of capturing data effectively, taking them through processing and analysis stages to extract valuable information. Currently, technological tools are applied to counteract incidents in motorcycle driving, whether they are part of the same vehicle or are externally involved in the environment. Incidents in motorcycle driving are increasing due to the demand for the acquisition of these vehicles, which makes it important to generate an approach towards reducing the risk of road accidents based on the analysis of dynamic behavior while driving. The development of this research began with the detection and storage of data associated with the dynamic acceleration variable of a motorcycle while driving, this with the help of a 3-axis accelerometer sensor generating a dataset, which was processed and analyzed for later be taken by three predictive classification models based on machine learning which were decision trees, K-Nearest neighbors and random forests. The performance of each model was evaluated in the task of better classifying the level of accident risk, concerning the driving style based on certain levels of acceleration. The random forest model showed a slightly better performance compared to that shown by the other two models, with 97.24% accuracy and recall, 97.16% precision and 97.17% F1 score.