Coal combustion in CO2/O2 (oxy-fuel combustion) allows reducing fossil carbon dioxide emissions in the atmosphere. The change of oxidizer from N2/O2 (air) to CO2/O2 changes the combustion process, including pyrolysis. The formation of sulfur and chlorine species during temperature-programmed coal pyrolysis in N2 and CO2 atmosphere and with heating rates of 10 and 20 K/min was studied. Two high volatile bituminous coals with different sulfur content but almost identical relative distribution of sulfur species (sulfide, pyritic, sulfate, and organic) were used in the experiments. The release of H2S, SO2, COS, and HCl was determined using mass spectrometry. Two and three peaks were observed in the hydrogen sulfide and sulfur dioxide release profiles, respectively, which are caused by the different sulfur species present in the coals. It was found that the release profile of sulfur dioxide varies for the coals, which means that information about sulfur forms is not sufficient to predict SO2 formation during pyrolysis. While the release rate of hydrogen sulfide and sulfur dioxide was either similar or lower in the presence of CO2 when compared to pyrolysis in N2, formation of carbonyl sulfide was only detected in CO2 atmosphere. For hydrogen chloride, two distinct release temperature ranges were identified. The predominant HCl formation occurred at temperatures ranging from 300 to 500 °C and was reduced by changing from N2 to CO2 atmosphere. The fate of sulfur and chlorine during pyrolysis of the two coals is very different although both coals are very similar regarding sulfur species distribution.