Detection of early rottenness on apples is still a challenging task for the automatic grading system due to the highly similarity between the rotten and sound tissues both in spectral and spatial domains. This research was conducted to develop an algorithm for detecting the early rottenness on apples by using hyperspectral reflectance imaging system combined with spectral analysis and image processing. In spectral domain, chemometric and pattern recognition methods were conducted for spectral analysis. In order to select the candidate optimal wavelengths that carry the most important information for distinguishing the rottenness from the sound tissues, successive projections algorithm (SPA) was conducted on the full range of average spectra extracted from the (regions of interest (ROIs) of sound and rotten tissues. The efficiency of the selected candidate optimal wavelengths for rottenness detection was also testified by using a binary particle least square discriminant analysis (PLS-DA) classifier in the spectral domain. In spatial domain, combined image processing methods were conducted for spatial analysis. In order to verify that the images at the optimal wavelengths were efficient and develop a robust detection algorithm, both principal component analysis (PCA) and minimum noise fraction (MNF) combined with conventional image processing methods were conducted on the images at the optimal wavelengths for image processing. Finally, the whole detection algorithm based on SPA-PLS-DA-MNF by using hyperspectral imaging combined with spectral analysis and image processing was designed and testified by the 120 testing apples. The results with 98 % overall detection accuracy indicated that the proposed algorithm was efficient and suitable for the rottenness apple detection. This research provides a foundational basis to develop the fast online inspection or real-time monitoring system for rottenness detection on apples both in the postharvest processing line or storage shelf.