In this study, we used HYDRUS-1D software to simulate soil water and nitrate (NO3-N) transport in a rainfed wheat field under various nitrogen (N) fertilizer scenarios (0 to 126 kg ha-1) in Morocco. We used inverse modeling to calibrate the input parameters involved in the simulation. The comparison between simulated and measured soil water (SWC) and NO3-N contents at different soil layers was carried out using the index of agreement (d), determination coefficient (R2), RMSE, and MAE. By considering the soil profile (0-100 cm), acceptable SWC simulation accuracies were obtained for the calibration and validation steps (d=0.88-0.94, R2=0.67 to 0.80, RMSE=0.034-0.051 cm3 cm-3, and MAE=0.024-0.038 cm3 cm-3), while NO3-N simulation was less accurate (d=0.49-0.82, R2=0.20-0.58, RMSE=0.015-0.068 mg cm-3, and MAE=0.012-0.046 mg cm-3). In addition, the observed NO3-N contents showed a lack of significant differences in the root zone (20-100 cm) between N fertilizer rates (p>0.05), which was consistent with the lack of N fertilizer effects on simulated NO3-N leaching below the soil profile by HYDRUS-1D. The NO3-N leached amount accounted for 25 kg ha-1 and was derived mainly from the initial soil N contents. The simulated N balance of the soil profile revealed that volatilization and denitrification were the major pathways of N fertilizer loss, accounting for about 3.8 and 51.7% of the N fertilizer rates, respectively. We suggest further studies to improve the simulation accuracies of HYDRUS-1D using sufficient calibration data from long-term wheat experiments to ensure effective N fertilization management in the study area.