Highlights • The influencing factors of rear-end crash risk were initially analyzed by using the desired safety margin (DSM) model. • The influencing factors including upper and lower limits of DSM, acceleration and deceleration rate and response time on the car-following behavior are investigated. And simulation experiments were designed to evaluate the impact of heterogeneity of car-following behavior on rear-end crash risk. • Decreasing the lower (or upper) limit of the DSM, increasing the response time, decreasing the sensitivity coefficient for deceleration, or increasing the sensitivity coefficient for acceleration can increase rear-end crash risk. • Two critical factors affect shock waves, namely, driving behavior characteristics and proportion of different driving styles. A wide extent of driving behavior heterogeneity can attenuate shock waves and subsequently reduce rear-end crash risk. • Exploring the effect of each driving behavior parameter on rear-end crash probability is useful for urban road traffic control, and it can provide improved understanding of abnormal driving behavior characteristics to reduce rear-end crash risks. Abstract An increasing number of vehicles travel on freeways result not only in traffic congestions but also accidents. Rear-end crashes in freeways can be collectively attributed to drivers, vehicles, and road infrastructure, but driving behavior plays a key role in influencing car-following safety. This study aims to investigate the impact of heterogeneity of driving behavior on rear-end crash risk. Driving behavior depends on perceived risk levels, acceleration and deceleration habits, and driver reaction characteristics. Thus, the influencing factors of rear-end crash risk were initially analyzed by using the desired safety margin (DSM) model. Subsequently, five driving behavior parameters, including upper and lower limits of DSM, sensitivity coefficients of acceleration and deceleration, and response time, were calibrated by using the vehicle trajectories from the Next Generation Simulation I-80 datasets. Simulation experiments were designed to evaluate the impact of heterogeneity of car-following behavior on rear-end crash risk. Results showed that decreasing the lower (or upper) limit of the DSM, increasing the response time, increasing the sensitivity coefficient for acceleration, or decreasing the sensitivity coefficient for deceleration can increase rear-end crash risk. In addition, if stable and unstable driving styles coexist, then their proportions have important influences on rear-end crash risk. These results imply that two critical factors affect shock waves, namely, driving behavior characteristics and proportion of different driving styles. Thus, a potential strategy for the adjustment of the proportions of unstable driving styles can attenuate shock waves and reduce rear-end crash risk to a certain extent. Moreover, a wide extent of driving behavior heterogeneity can attenuate shock waves and subsequently reduce rear-end crash risk. Overall, driving behavior heterogeneity has an important impact on rear-end crash risk. Exploring the effect of each driving behavior parameter on rear-end crash probability is useful for urban road traffic control, and it can provide improved understanding of abnormal driving behavior characteristics to minimize rear-end crash risks. [ABSTRACT FROM AUTHOR]