This study developed a convolutional neural network (CNN) model based on feature-level data fusion for quantitatively detecting aflatoxin B1 (AFB1) in peanuts. Using a portable near-infrared (NIR) spectrometer and a Raman spectrometer, NIR and Raman spectra were collected from peanut samples with varying levels of fungal contamination. The spectral data were then enhanced and preprocessed, and individual CNN models were constructed for each type of spectrum. Building on the single-spectrum models, data-level and feature-level fusion of the NIR and Raman spectra were performed, and corresponding CNN models were developed for the quantitative detection of AFB1 in peanuts. Experimental results demonstrated that the CNN models with data fusion significantly improved detection performance and generalization ability compared to single-spectrum CNN models, particularly those using feature-level fusion. The feature-level fusion CNN model yielded the best performance, with a root mean square error of prediction of 19.7787 mu g & sdot;kg- 1, a prediction correlation coefficient of 0.9836 for test set 1 (containing augmented spectra), and 0.9890 for test set 2 (containing only raw spectra), with a relative prediction deviation of 7.6506. Overall, this study demonstrated the superiority of data fusion and the feasibility of applying CNNs in spectral detection, providing a reference for quantitatively detecting mycotoxins.