Abstract Apple moldy core is a fungus-infested disease that is extremely insidious, usually occurring inside the fruit, making it very difficult to distinguish from the exterior with the naked eye. Using VIS/NIR transmission spectroscopy, this study successfully detected moldy core apples. By combining four wavelength selection algorithms (CARS, CARS-SPA, MC-UVE, and MC-UVE-SPA) with four classifiers (SVM, ELM, KNN, and LDA-KNN), discrimination models were established for two-class and three-class classifications. MC-UVE-SPA-LDA-KNN achieved an AUC of 0.99 and an accuracy of 98.82% for two-class classification, while MC-UVE-SPA achieved an AUC of 0.99 and an accuracy of 97.64% for three-class classification. This confirms MC-UVE-SPA as an effective tool for selecting wavelengths specific to moldy core apples, facilitating precise identification and differentiation of apple states. This study advances dynamic online detection of early-stage moldy core conditions in apples, reducing post-harvest disease occurrence and preserving fruit quality effectively. Graphical Abstract