Polymers' controlled pyrolysis is an economical and environmentally friendly solution to prepare activated carbon. However, due to the experimental difficulty in measuring the dependence between microstructure and pyrolysis parameters at high temperatures, the unknown pyrolysis mechanism hinders access to the target products with desirable morphologies and performances. In this study, we investigate the pyrolysis process of polystyrene (PS) under different heating rates and temperatures employing reactive molecular dynamics (ReaxFF-MD) simulations. A clear profile of the generation of pyrolysis products determined by the temperature and heating rate is constructed. It is found that the heating rate affects the type and amount of pyrolysis intermediates and their timing, and that low-rate heating helps yield more diverse pyrolysis intermediates. While the temperature affects the pyrolytic structure of the final equilibrium products, either too low or too high a target temperature is detrimental to generating large areas of the graphitized structure. The reduced time plots (RTPs) with simulation results predict a PS pyrolytic activation energy of 159.74 kJ/mol. The established theoretical evolution process matches experiments well, thus, contributing to preparing target activated carbons by referring to the regulatory mechanism of pyrolytic microstructure.