In the context of local residents’ travel activities, access to transportation facilities is crucial and a key factor in achieving the goals of a 15-min city. However, current research on accessibility and land prices seldom fully considers the exploration of the relationship between the two using machine learning models. In this study, we conduct an analysis based on land price and accessibility in Beijing. Firstly, factors such as accessibility, population density, land use types, the number of Points of Interest (POI), and housing prices are selected as independent variables for the model, with land price as the dependent variable. Secondly, the CatBoost model is employed to investigate the complex relationship between accessibility to transit and land prices. Finally, the study introduces the XGBoost model and the ordinary least squares (OLS) method for comparison, validating the effectiveness of the CatBoost model in studying the complex relationship between accessibility and land prices through the comparison of model performance evaluation metrics. A clear nonlinear relationship exists between public transportation accessibility and land prices. Accessibility to bus within a 15-min bicycle is positively associated with land price; its trend shows a sharp increase followed by a gradual increase, and then another sharp increase. Accessibility to metro within the multistage distance threshold walk has a roughly positive association with land price within a certain range. While accessibility to bus within a 15-min walk and accessibility to bus within the multistage distance threshold walk have a negative association with land price. The nonlinear patterns between the four accessibility variables and land prices differ and exhibit significant spatial heterogeneity. Both housing prices and population density positively correlate with land prices. Housing prices sharply increase, then gradually, while population density gradually rises, then sharply. This paper explores the relationship between the two, reinforcing research on the mutual influence of public transportation facilities and surrounding environmental elements. It provides a theoretical basis for promoting transit-oriented development (TOD) and city planning.