The benefits of large reserves, wide distribution, and high combustion energy density of natural gas hydrates are of great practical importance to alleviate the energy tension, enhance the existing energy system in China and reduce the greenhouse effect. The CO2 replacement method is a critical way to develop natural gas hydrate, while traditional experimental methods are difficult to reveal the microscopic mechanism of the replacement system. An MD (molecular dynamics) technique was utilized in this work to simulate the process of carbon dioxide replacement of gas hydrates. This simulation investigates the effects of temperature, pressure, and CO2 purity during the CO2 replacement process. CO2, different concentrations of CO2/H2O, and CO2/NH3 are used as the injected fluid. The simulation results show that the influence of temperature on the CO2 replacement of natural gas hydrate is more significant than that of pressure. Within the temperature and pressure range specified in the simulation, H2O inhibits the replacement of CO2, owing to the inhibitory effect increasing as the concentration of H2O increases; NH3 promotes the process of CO2 replacement under the temperature conditions of 250 K and 260 K, and the promotion effect becomes more significant as the concentration of NH3 increases. However, adding NH3 inhibits the CO2 replacement process with hydrate when the temperature lifts to 270 K. These findings provide new ideas to improve the efficiency of the CO2 replacement method and provide theoretical insight for the engineering exploitation of hydrates.