Cellphone usage is often considered to be one of the major causes of distracted driving. Similarly, voice messaging is identified as a potential cause of distracted driving but has received limited attention in the literature. Thus, this study aims to develop supervised machine learning (ML) methods to detect distracted driving events caused by texting and voice messaging using vehicle trajectory data. Vehicle trajectory data was collected from 92 participants who drove a simulated network of the Baltimore metropolitan area using a driving simulator. Different key variables were extracted from the data to construct the features for developing the ML methods, including speed, brake usage, throttle, steering velocity, brake light, and offset from the road center. Several methods, including the support vector machine, k-nearest neighbor, decision tree, neural network, and adaptive boosting (AdaBoost), were examined on the data to achieve the best model. In addition, several metrics were used to assess the performance of the ML models, such as accuracy, sensitivity, precision, the Matthews correlation coefficient, and the area under the receiver operating characteristic curve (AUC-ROC). The results indicated that the AdaBoost algorithm had the best yields, with an accuracy of 74.67% and AUC-ROC of 82.5% on the independent test set. The findings of this study can be directly leveraged to develop in-vehicle driver warning systems to alert drivers with respect to distracted behavior, which lead to the reduction of distracted driving events and an improvement in traffic safety.