Background and aims: The increasing input of anthropogenically-derived nitrogen (N) to ecosystems raises a crucial question: how do N inputs modify the soil microbial stability, and thus affect crop productivity? Methods: Soils from an 8-year rice-wheat rotation experiment with increasing N-input rates were subjected to drying–rewetting (DW) cycles for investigating the resistance and resilience of soil functions, in terms of abundances of genes (potential functions) and activities of enzymes (quantifiable functions), to this stress, and particularly the contribution of resistance and resilience on crop production was evaluated. Results: Although the DW cycles had a stronger effect compared to N fertilization level, the N input was also important in explaining the variation in the resistance and resilience of functional genes and the activities of enzymes involved in C, N and P cycling. Crop yields benefited from both of high resistance and high resilience of soil microbial functions, though the resistance and resilience of soil enzyme activities exhibited a stronger contribution to crop yields compared to the functional genes and the overall contribution strength was conditioned by N input levels. Conclusions: In addition to the well-known direct contribution of N fertilization on crop yields, N input plays an indirect role on crop production via conditioning the resistance and resilience of soil functions in response to repeated DW cycles. © 2019, Springer Nature Switzerland AG.