Electric two-wheeled vehicle is one of the main commuting tools in China, but they are also more likely to have violations of the road group. In order to study the effect of the presence of violation on the severity of road traffic crashes among electric two-wheeler riders, in this study, the effects of rider characteristics, road characteristics, collision characteristics, and environmental characteristics on the severity of injuries of electric two-wheeled vehicle riders were considered separately analyzed based on the data of 6403 two-wheeled electric vehicle traffic crashes in a region of Shandong Province from 2015 to 2021, and a random parametric logit model considering the heterogeneity of the mean and the variance (RP-HMV logit) was established based on the presence or absence of violation behaviors of riders, respectively, in order to explore unobserved heterogeneity. In order to test the validity of the model for modeling the injury severity of pedestrians riding electric two-wheelers, multinomial logit (MN-logit model), and random parameter logit model (RP-logit) were estimated, and the results showed that the RP-HMV logit model was significantly superior in terms of goodness of fit. The study showed that some of the factors differed somewhat between the two scenarios, such as gender, while the factors that were significant in both scenarios were >60, broken pavement, street lights at night, no street lights at night, mixed motorized and nonmotorized lanes, sidewalks, other angles, no control, severe weather, and visibility <200 m, where the severe weather and visibility <200 m were random parameters obeying normal distributions, there is a significant difference between having street lights and no control at night in both scenarios, and the difference is significant. The results of the study can provide a reference for the development of targeted countermeasures to improve the traffic safety of electric two-wheeled vehicles in China.