A comprehensive understanding of the multifaceted ramifications of the coronavirus disease 2019 (COVID-19) on transit ridership is imperative for the optimization of judicious traffic management policies. The intricate influences of this pandemic exhibit a high degree of complexity, dynamically evolving across spatial and temporal dimensions. At present, a nuanced understanding remains elusive regarding whether disparate influencing factors govern inbound and outbound passenger flows. This study propels the discourse forward by introducing a methodological synthesis that integrates time series anomaly detection, impact inference, and spatiotemporal analysis. This amalgamation establishes an analytical framework instrumental in elucidating the spatiotemporal heterogeneity intrinsic to individual impact events, grounded in extensive time series data. The resulting framework facilitates a nuanced delineation, affording a more precise extraction of the COVID-19 impact on subway ridership. Empirical findings derived from the daily trip data of the Beijing subway in 2020 substantiate the existence of conspicuous spatiotemporal variability in the determinants influencing relative shifts in inbound and outbound ridership. Notably, stations situated in high-risk areas manifest a conspicuous absence of correlation with outbound trips, exhibiting a discernibly negative impact solely on inbound trips. Conversely, stations servicing residential and enterprise locales demonstrate resilience, evincing an absence of significant perturbation induced by the outbreak.