Several experimental reports have shown that segregated carbon and nitrogen have slightly different roles on the strength of ferriticsteels; however, the mechanistic origin of this behavior is not yet clearly understood. In the present work, large scale molecular dynamics (MD) simulations were used to explore the effect of segregated carbon and nitrogen on the deformation behavior of nanocrystalline (nc) ferrite. The deformation mechanisms associated with plasticity during tensile test were analyzed. It is found that, at low strain, grain boundary (GB) sliding mediated plasticity is dominated, whereas dislocation activity and deformation twinning are the primary deformation mechanisms at high strain. The results reveal that the segregation of carbon or nitrogen leads to a significant reduction of GBs dislocations. Besides, the stress required for twinning nucleation was found to strongly depend on the segregated solute type. The flow stress increases for both cases; however, nitrogen has a relatively small impact compared to carbon. The competition between different deformation mechanisms was interpreted by stable stacking fault, unstable stacking fault as well as unstable twinning fault energies. The simulation results were compared to the available experimental data and models and a fair agreement was found.