The metro station ridership features are associated significantly with the built environment factors of the pedestrian catchment area surrounding metro stations. The existing studies have focused on the impact on total ridership at metro stations, ignoring the impact on varying patterns of metro station ridership. Therefore, the reasonable identification of metro station categories and built environment factors affecting the varying patterns of ridership in different categories of stations is very important for metro construction. In this study, we developed a data-driven framework to examine the relationship between varying patterns of metro station ridership and built environment factors in these areas. By leveraging smart card data, we extracted the dynamic characteristics of ridership and utilized hierarchical clustering and K-means clustering to identify diverse patterns of metro station ridership, and we finally identified six main ridership patterns. We then developed a newly built environment measurement framework and adopted multinomial logistic regression analysis to explore the association between ridership patterns and built environment factors. (1) The clustering analysis results revealed that six station types were classified based on varying patterns of passenger flow, representing distinct functional characteristics. (2) The regression analysis indicated that diversity, density, and location factors were significantly associated with most station function types, while destination accessibility was only positively associated with employment-oriented type stations, and centrality was only associated with employment-oriented hybrid type station. The research results could inform the spatial planning and design around metro stations and the planning and design of metro systems. The built environment of pedestrian catchment areas surrounding metro stations can be enhanced through rational land use planning and the appropriate allocation of urban infrastructure and public service facilities.