Expressways in urban agglomerations are important in connecting cities, thus attracting great attention from researchers in the expressways risk assessment. However, there is a lack of safety assessment models suitable for the characteristics of expressways in Chinese urban agglomerations, and the nature and mode of dynamic risks on Chinese highways are still unclear. Therefore, this study adopts the Adaptive Neural Fuzzy Inference System (ANFIS) and the method of decision tree, combined with data from the Beijing section of the Beijing Harbin Expressway, to model the risk of accident-prone highways in urban agglomerations. To determine the optimal model, we evaluated the model’s bias at different time intervals. In addition, key factors affecting highway safety were analyzed, providing scientific support for the risk prevention of highways in urban agglomerations in China.