The complex global energy transition profoundly impacts China, the world's largest energy consumer. However, the existing body of literature often overlooks the distinct long-term mechanisms and differentiated shock impacts of this transition on national energy security. This paper addresses this by analyzing two key transition aspects—fossil fuel phase-out and renewable energy development—differentiating supply-side and demand-side shocks. We empirically investigate their medium- and long-term impacts on China using vector autoregressive (VAR) models and impulse response analysis. Key findings include: (1) Supply-side renewable development and fossil withdrawal show opposing initial security impacts; their combined positive effect persists for approximately a decade. (2) Global renewable development enhances market stability and system resilience (∼7 %) but increases crude oil market risks. (3) Renewable energy's positive impact is similar for consumption metrics and demand shocks; fossil withdrawal's suppressive effect is stronger on supply. (4) Solar and biomass significantly boost sustainability metrics (8 % improvement); wind energy's positive effects are particularly long-lasting (∼15 years), underscoring its long-term strategic importance.