In this study, we critically evaluated the performance of an emerging technology, hyperspectral imaging (HSI), for detecting microplastics (MPs) in soil. We examined the technology's robustness against varying environmental conditions in five groups of experiments. Our findings show that near-infrared (NIR) hyperspectral imaging (HSI) effectively detects microplastics (MPs) in soil, though detection efficacy is influenced by factors such as MP concentration, color, and soil moisture. We found a generally linear relationship between the levels of MPs in various soils and their spectral responses in the NIR HSI imaging spectrum. However, effectiveness is reduced for certain MPs, like polyethylene, in kaolinite clay. Furthermore, we showed that soil moisture considerably influenced the detection of MPs, leading to nonlinearities in quantification and adding complexities to spectral analysis. The varied responses of MPs of different sizes and colors to NIR HSI present further challenges in detection and quantification. The research suggests pre-grouping of MPs based on size before analysis and proposes further investigation into the interaction between soil moisture and MP detectability to enhance HSI's application in MP monitoring and quantification. To our knowledge, this study is the first to comprehensively evaluate this technology for detecting and quantifying microplastics. Environmental ImplicationMicroplastics (MPs), increasingly recognized as hazardous materials, pose significant ecological and health risks due to their persistence and potential for bioaccumulation. Our research highlights the significant impact of environmental factors on the detection of MPs in soil using spectrometric methods such as hyperspectral imaging (HSI). This aspect is vital yet often neglected in MP monitoring and detection efforts. By evaluating HSI technology for MP detection in various soil conditions, our study contributes to developing effective monitoring methods. Our findings facilitate better monitoring and managing MP pollution, thus addressing a critical environmental problem and protecting terrestrial ecosystems and human health.