This paper aims to provide insights on the design of optimal subsidy policies to enhance energy security amidst energy disruptions triggered by geopolitical conflicts. We introduce a novel Markov switching dynamic stochastic general equilibrium (MS-DSGE) model to address the limitations of existing integrated assessment models in environmental evaluation. These models often fail to adequately consider the environmental and economic impacts of geopolitical conflicts and do not prioritize energy security sufficiently in policymaking. Our application of the MS-DSGE model to the Russia–Ukraine conflict reveals significant decreases in output, social welfare, and energy consumption during disruptions. The mere anticipation of an energy crisis influences household behaviors, leading to a reduction in energy, output, and consumption volatility, while concurrently increasing volatility in social welfare. We show that an optimal subsidy policy should be contingent upon productivity levels, energy imports, and the economy’s responsiveness to economic shocks. Moreover, the policy should also be adaptable to prevailing economic conditions and the likelihood of an upcoming crisis.