AbstractThe processing parameters such as the heat treatment temperature, type of preceramic precursor, and post‐synthesis treatments are key factors for the development the different microstructures in polymer‐derived ceramics. Moreover, doping with different heteroatoms has increased the ability of the polymer‐derived ceramics to produce tunable nanostructures with a controlled pore size and distributions. A preceramic precursor containing P has been prepared from a commercial polysiloxane polymer and a phosphate alkoxide. It has been subjected to thermal treatments in N2, NH3, and Cl2 atmospheres in different order sequences to create differentiated microstructures either in the ceramic matrix and the carbon phase. The structural, textural, and spectroscopic characterization revealed that the P atoms play a key role in the evolution of the microstructure during the thermal treatments. If the chlorination is carried out before the treatment in NH3, a silicophosphate matrix is formed and prevents from nitrogen incorporation into the free carbon phase. On contrary, if the NH3 treatment is carried out before the chlorination, the carbon phase is predominantly modified by the incorporation of P atoms within the free carbon network.