Traditional methods for detecting soil microplastics include chemical digestion, density separation, staining, etc. These methods often only provide qualitative analysis of microplastics and are difficult to accurately quantify. To address this issue, laser induced fluorescence (LIF) technology is introduced, which can achieve high sensitivity, non-destructive, and rapid detection, and improve the accuracy and efficiency of qualitative and quantitative analysis of soil microplastics. Therefore, based on LIF technology, a qualitative prediction model for optimizing Extreme Learning Machine (ELM) using Osprey Optimization Algorithm (OOA) and a quantitative prediction model combining Continuous Projection Algorithm (SPA) with Partial Least Squares Algorithm (PLS) were established. Qualitative analysis used eight types of microplastics, with AS, PA66, ABS, PS, POM, PBT, PET, and PVC as experimental samples. Initially, spectral data is obtained using LIF technology and the raw spectral data is pre-processed using polynomial smoothing algorithm (SG) and moving average (MA) methods. Subsequently, factor analysis (FA) and local linear embedding (LLE) techniques are applied to dimensionality reduction and then input into the ELM model. At the same time, the ELM parameter is optimized by using OOA algorithm. In the quantitative analysis, PA66 powder and soil are mixed in different proportions (10:0, 8:2, 5:5, 2:8, 0:10), SG and MA pre-processing are performed on the spectral data obtained by LIF technology, and SPA is used to select the spectral characteristic wavelength for the original data and the pre-processed spectral data, and then a linear regression model is established combined with PLS. In order to facilitate the comparison of data, the experimental results are reserved to 5 decimal places, the experimental results indicate that LIF technology is faster than traditional methods in extracting raw data. The convergence of the OOA-optimized ELM model is better than that of the PSO-optimized ELM model. Among all the models of qualitative analysis, SG-LLE-OOA-ELM had the best prediction effect, with mean square error (MSE) of 0.00834, coefficient of determination (R2) of 0.99841, root mean square error (RMSE) of 0.09134, and mean absolute error (MAE) of 0.07038. Among the models of quantitative analysis, the best effect is SG-SPA-PLS model with R2 of 0.99951.