Reliable and accurate estimates of metro demand can provide metro authorities with insightful information for the planning of route alignment and station locations. Many existing studies focus on metro demand from daily or annual ridership profiles, but only a few concern the variation in hourly ridership. In this paper, a geographically and temporally weighted regression (GTWR) model was used to examine the spatial and temporal variation in the relationship between hourly ridership and factors related to the built environment and topological structure. Taking Nanjing, China as a case study, an empirical study was conducted with automatic fare collection (AFC) data in three weeks. With an analysis of variance (ANOVA), it was found that the GTWR model produced the best fit for hourly ridership data compared with traditional regression models. Four built-environment factors, namely residence, commerce, scenery, and parking, and two topological-structure factors, namely degree centrality and closeness centrality, were proven to be significantly related to station-level ridership. The spatial distribution pattern and temporal nonstationarity of these six variables were further analyzed. The result of this study confirmed that the GTWR model can provide more realistic and useful information by capturing spatiotemporal heterogeneity.