The 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 polymerderived 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 N 2 , NH 3 , and Cl 2 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 NH 3 , a silicophosphate matrix is formed and prevents from nitrogen incorporation into the free carbon phase. On contrary, if the NH 3 treatment is carried out before the chlorination, the carbon phase is predominantly modified by the incorporation of P atoms within the free carbon network.