The fragmented remodeling of historic districts undermines the spirit of place. Understanding the intricate relationship between the neighborhood environment and the spirit of place is essential for sustainable urban development. Current research predominantly relies on case studies and the concept of place, which are subjective and lack specific analysis of how the neighborhood environment shapes the spirit of place. In this study, we examine Chuancheng Street in Handan City as a case study. Utilizing the eXtreme Gradient Boosting (XGBoost) model and multi-source data, combined with SHapley Additive exPlanation (SHAP) and Partial Dependence Plots (PDP), we analyze the non-linear and synergistic effects of the street environment on the spirit of place in historic districts. The findings reveal that (1) the proportion of enduring sociability (PES) on the street significantly shapes the spirit of place, with cultural space elements being less prioritized in perception; (2) PES, green vision index (GVI), Integration_800 m, and mixed land use (MLU) have pronounced non-linear impacts on the spirit of place, with strong threshold effects, and these factors also demonstrate a synergistic effect; (3) There are notable spatial variations in the spirit of place across different blocks, particularly influenced by the authenticity of cultural heritage. This study provides fundamental insights into the spirit of place in historic neighborhoods, enabling a better understanding of complex urban dynamics and informing future street regeneration from a place perspective.