A large body of evidence on traffic accidents indicates that distracted driving is a major cause of accidents. To investigate the relationship between driver performance in both normal and distracted states and to discriminate which state a driver is in based on driving performance, a simulator was used to simulate drivers driving in an urban road environment, and a distraction task was designed to motivate drivers to enter a cognitive distraction state. Data were collected from 80 drivers in each of the two driving states, and a database was built. Deep neural network (DNN) is a multilayer perceptron structure, relative to the defects of other classical algorithms with unclear classification thresholds, DNN can be used to process high-dimensional data through its neural node node-linked structure. Combining the Gray Wolf algorithm (GWO) for the initial weights and thresholds of the DNN network as a whole, a four-layer network structure is built to predict the test samples, while support vector machines ( SVM) and random forest as controls. The results show that the accuracy of DNN for predicting test samples is 95.13%, that of SVM is 77.56%, and that of random forest is 72.32%. The F1 score of the DNN model is higher than that of SVM, and the detection effect is better and can be applied to detect the driving status of drivers.INDEX TERMS Driving behavior, cognitive distraction, simulated driving, deep neural networks, support vector machines.