This dataset contains raster predictor layers used for soil nutrient mapping in the Beni Moussa irrigated area, Morocco. The dataset includes Sentinel-2 spectral bands, vegetation and soil-related spectral indices, and other spatial predictor variables used for machine-learning-based prediction of soil nitrogen (N), phosphorus (P), and potassium (K). The raster layers were prepared for spatial modelling and mapping of soil macronutrients. The dataset is associated with the Soil NPK Mapping project and is intended to support reproducibility of the analysis and results.