There is uncertainty on how generally applicable near-infrared reflectance spectroscopy (NIRS) calibrations are across genotypes and environments, and this study tests how well a single calibration performs across a wide range of conditions. We also address the optimization of NIRS to perform the analysis of crude protein (CP) content in a variety of cowpea accessions (n = 561) representing genotypic variation as well as grown in a wide range of environmental conditions in Tanzania and Uganda. The samples were submitted to NIRS analysis and a predictive calibration model developed. A modified partial least-squares regression with cross-validation was used to evaluate the models and identify possible spectral outliers. Calibration statistics for CP suggests that NIRS can predict this parameter in a wide range of cowpea leaves from different agro-ecological zones of eastern Africa with high accuracy (R2cal = 0.93; standard error of cross-validation = 0.74). NIRS analysis improved when a calibration set was developed from samples selected to represent the range of spectral variability. We conclude from the present results that this technique is a good alternative to chemical analysis for the determination of CP contents in leaf samples from cowpea in the African context, as one of the main advantages of NIRS is the large number of compounds that can be measured at once in the same sample, thus substantially reducing the cost per analysis. The current model is applicable in predicting the CP content of young cowpea leaves for human nutrition from different agro-ecological zones and genetic materials, as cowpea leaves are one of the popular vegetables in the region.