Heavy metal contamination in waste incineration fly ash poses serious environmental and public health risks, necessitating efficient and precise detection methods. Traditional techniques require complex sample preparation and lengthy analysis, limiting their suitability for on-site or real-time monitoring. To address this, this study proposes a rapid detection method using visible and near-infrared reflectance spectroscopy to improve efficiency and reduce costs. Zn (zinc) and Pb (lead) spectral characteristics were analyzed through first-order differentiation (FD), second-order differentiation (SD), de-trending (DT), and logarithm of the reciprocal (LogInv) transformations, followed by continuous wavelet transform (CWT) to extract key bands (max |r|=0.78). A stacking model integrating partial least squares regression (PLSR), back-propagation neural network (BPNN), support vector regression (SVR), random forest (RF), and extreme gradient boosting (XGBoost) was developed to optimize spectral transformation and inversion modeling. Stacking outperformed individual models, achieving the highest accuracy for Zn (R2=0.748) and Pb (R2=0.735) with CWT-SD and CWT-FD transformation. BPNN exhibited overfitting in small samples, whereas PLSR was constrained by linear assumptions. In contrast, stacking combines the strengths of all the base models, improving accuracy and stability. This study elucidates the spectral characteristics of fly ash and validates the effectiveness of stacking in hyperspectral heavy metal prediction. The findings provide theoretical and technical support for efficient, non-destructive detection, with promising applications in waste incineration management and environmental monitoring.