Changes to leaf flavonoids along environmental gradients are often related to the self-protection of plants, reflecting the latter's adaptability to their external environment. Yet few studies have investigated the relationship between flavonoid and environmental factors. Here, we determined the concentrations of quercetin (QUE), isorhamnetin (ISO), and kaempferol (KAE) in leaves of Chinese sea-buckthorn at 37 sites across northern China, and explored the relation of these flavonoids to the environment (using Generalized Additive Modeling, collinearity of hierarchical partitioning, and structural equation modeling). The QUE component exhibited significant changes along the environmental gradients, while ISO changed significantly along the gradients of mean annual temperature (MAT), altitude (ALT), soil available nitrogen (AN), and the ratio of soil available nitrogen to soil available phosphorus (AN/AP) (p < 0.05). However, KAE changed significantly along fewer gradients, only those of mean annual precipitation (MAP), AP, and soil available potassium (AK) (p < 0.05). After removing environmental collinearity, for the three flavonoids' total content the order of environmental factors' influence was ALT > MAT > AN/AP > AK> AN > MAP > AP. Considered separately, for QUE the order was ALT > MAT > AN/AP > AN > MAP; that for ISO was MAT > ALT > AN/AP > AN > MAP; and that for KAE is AK > AP. Chinese sea-buckthorn adapts to harsh habitats by increasing QUE and ISO, with KAE responding to specific nutrients, offering a theoretical basis for improved cultivation and economic value.