With the development of large-scale blast-furnace and oxygen-rich coal-injection technology, as well as national green and low-carbon policy requirements, the ironmaking process has increasingly strict requirements for blast-furnace raw materials, such as new and higher requirements for coke quality and thermal performance. In this study, the melting loss reaction in a blast furnace was simulated under laboratory conditions and the microstructure evolution of coke after melting loss under CO2 and CO2 + H2O conditions was studied. The results showed that under a CO2 atmosphere, the specific surface area and pore volume of coke and the number of micropores in coke first increased and then decreased with the increase in reaction time, while the average pore size first decreased from 17.289 to 8.641 nm and then increased to 9.607 nm. In the gasification reaction between CO2 and coke, the relative content of the graphitized structure (IG/IAll) increased first, then decreased and then increased with the increase in reaction time, while the change trends of disordered structure (ID3/IG) and unstable structure (ID4/IG) were opposite to IG/IAll, indicating that coke still tended to be more orderly with the increase in time. In the mixed atmosphere of CO2 and H2O, the specific surface area and IG/IAll of coke increased with the increase in H2O content. However, when the proportion of H2O exceeded 50%, the specific surface area decreased slightly, and the pore-size value corresponding to the peak value in the pore-size distribution curve shifted to the right, and the average pore-size increased in the nanosize range.