Understanding the effect of relevant variables on secondary crashes could provide reliable traffic intervention evidence for decision makers, which ultimately would contribute to the prevention of secondary crashes. Road crashes present obvious spatiotemporal heterogeneity, and previous studies (e.g., geographically weighted regression [GWR] based method) only analyzed the spatial heterogeneity without considering the timescale of related variables. This study proposes a geographically and temporally weighted regression model (GTWR), which adds a time variation to the conventional GWR model. The GTWR model is used to explore the spatiotemporal effects of relevant variables on the secondary crashes on expressways. The empirical study using expressways in Anhui, China, illustrates that the density of rainy days, snow and ice, and occupied middle lanes are negatively associated with secondary crashes. Then the temporal variation characteristics of each influencing factor at different timescales (e.g., weekdays, weekends, and time of day such as night, morning, afternoon, and evening) are analyzed, which reveals the spatial distribution characteristics of the influencing factors in each time period. The finding indicates that the explanatory variables have heterogeneous effects on the frequency of secondary crashes. The model comparison further demonstrates that the proposed GTWR model outperforms the ordinary least squares (OLS) and GWR methods in data fitting and spatiotemporal modeling. The research findings can aid in prevention of secondary crashes on freeways.