Doping quantum-confined semiconductor nanocrystals offers an effective way to tailor their unique properties. However, the inherent challenges of nanoscale doping processes, such as the low probability of successful doping, have hindered their practical applications. Nucleation-controlled doping has emerged as a potential solution, but a comprehensive mechanistic understanding of this process is lacking. Herein, the nucleation-controlled doping process facilitated by magic-sized cluster intermediates is elucidated. This approach enables the synthesis of 2D ZnSe quantum nanoribbons with two distinct doping sites. Remarkably, the identity of the dopants plays a critical role in determining the chemical pathways of nucleation-controlled doping. Substitutional doping of magic-sized clusters with Mn2+ ions leads to successful substitutional doping of the final 2D nanocrystals. Conversely, Co2+ ions, initially occupying substitutional positions in the magic-sized cluster intermediates, relocate to alternative sites, such as interstitial sites, in the final nanocrystals. First-principle calculations of dopant formation energies support these experimental findings, demonstrating the thermodynamic favorability of specific dopant site preferences. Moreover, a consistent tendency is observed in CdSe nanocrystals, suggesting that the proposed doping mechanism is generally applicable to II–VI semiconductors. This study will advance the controlled synthesis of various doped semiconductor nanocrystals using nucleation-controlled doping processes.