Given its capacity to foster pro-social behavior and enhance subjective well-being, the investigation of determinants influencing generalized trust has assumed particular importance. While extensive prior research has delved into individual-level and social-level factors affecting generalized trust, the role of natural environmental factors has remained relatively unexplored. Since humans consistently experience and respond to ambient temperature, this study sought to examine the potential association between ambient temperature and generalized trust in the expansive geographic context of China. Drawing on data from a nationwide survey in China (N = 26,910), the consistent findings from zero-order correlation, multilevel models, and machine learning analyses collectively unveil a negative correlation between temperature clemency and generalized trust. This implies that individuals residing in regions characterized by comfortable temperatures (approximating 22 °C) in China are less inclined to place trust in strangers within society. Furthermore, random forests analyses demonstrate that temperature clemency surpasses several influential variables (such as sex and population) in predicting generalized trust, underscoring the role of ambient temperature as one of the determinants of generalized trust.