In this study, we examine the factors associated with the integrated use of dockless bikesharing (DBS) and metros. Special attention is paid to the nonlinear effects of these factors, using machine learning; in this case, a random forest model and accumulated local effects (ALE) plots. We measure the integrated use of DBS and metros based on DBS data and metro smart card data in Beijing. Explanatory variables include metro station characteristics, road infrastructure, public transportation services, land use, and urban density, as well as meteorological variables. We find that metro ridership and DBS density around service areas are the most crucial factors for promoting cycling access/ egress near metro stations. After reaching the thresholds of 6,000 trips for metro ridership and 200 bikes/ per km2 for DBS density, notable joint effects are evident between the two variables, which are negative in egress trips but positive in access trips. Bicycle parking and bus transfer distance and their connectivity to metro stations are important for integrated use. We find that buses will be less competitive when exceeding 25 lines per station. Population density has a nonlinear effect, with a positive association below 9,000 persons/ km2 and a decreasing effect above this level. The land-use mix index was also found to be negatively associated with integrated use, and bicycle lanes are not associated with integrated use. Our results demonstrate that public transit service planning should consider the constraints of resources and public space, and we provide recommendations for governments and stakeholders to reallocate DBS and other public transit services around metro stations.