Amino-cured epoxy resins are widely used in the electrical and electronic industry for their excellent properties. To investigate the mechanism of the effect of O2 and H2O on the pyrolysis behavior of epoxy resin, in this paper, the cross-linked structure of bisphenol A type epoxy resin cured by adducts of diethylenetriamine and butyl glycidyl ether is modeled based on the ReaxFF force field, and the thermal decomposition processes at different temperatures and gas atmospheres were simulated and the pathways of the small molecule products were clarified. The results show that epoxy resin will produce small molecule gas products, such as H2, CO, H2O, OH, CH2O, and free radicals, in the process of pyrolysis; the presence of amino groups also generates nitrogen-containing radicals, such as CN, CH2N, and C2H4N; as the reaction temperature increases, the rate of pyrolysis reaction will be accelerated. The same temperature in oxygen and water atmospheres can accelerate the breakage of epoxy resin main chain by promoting the breakage of carbon and oxygen bonds and, at the same time, promote the generation of small molecule gases, such as H2 and CO.