© 2017 The Authors. Methods in Ecology and Evolution © 2017 British Ecological Society Joint species distribution models (JSDM) are increasingly used to analyse community ecology data. Recent progress with JSDMs has provided ecologists with new tools for estimating species associations (residual co-occurrence patterns after accounting for environmental niches) from large data sets, as well as for increasing the predictive power of species distribution models (SDMs) by accounting for such associations. Yet, one critical limitation of JSDMs developed thus far is that they assume constant species associations. However, in real ecological communities, the direction and strength of interspecific interactions are likely to be different under different environmental conditions. In this paper, we overcome the shortcoming of present JSDMs by allowing species associations covary with measured environmental covariates. To estimate environmental-dependent species associations, we utilize a latent variable structure, where the factor loadings are modelled as a linear regression to environmental covariates. We illustrate the performance of the statistical framework with both simulated and real data. Our results show that JSDMs perform substantially better in inferring environmental-dependent species associations than single SDMs, especially with sparse data. Furthermore, JSDMs consistently overperform SDMs in terms of predictive power for generating predictions that account for environment-dependent biotic associations. We implemented the statistical framework as a MATLAB package, which includes tools both for model parameterization as well as for post-processing of results, particularly for addressing whether and how species associations depend on the environmental conditions. Our statistical framework provides a new tool for ecologists who wish to investigate from non-manipulative observational community data the dependency of interspecific interactions on environmental context. Our method can be applied to answer the fundamental questions in community ecology about how species’ interactions shift in changing environmental conditions, as well as to predict future changes of species’ interactions in response to global change.