The invention discloses a method and a device for online detecting quality index of yellow rice wine in bottle. The online detection device comprises an illumination system, an air conditioning system, a conveying belt, a receiving lens fixing device, a receiving lens, an optical fiber, a spectrometer, a computer, a trigger circuit and a photoelectric switch. The method comprises the following steps of: collecting the near IR spectrum of an empty bottle of a yellow rice wine sample in the bottle as the background spectrum; reducing the background spectrum from the spectrum of an original yellow rice wine sample in bottle as the sample spectrum; constructing the correction model of the key quality index of yellow wine according to the spectra and a physical and chemical analysis result by adopting partial least-squares regression method; and online detecting the quality of the yellow rice wine according to corresponding model. Based on near IR spectral analysis technology, the invention can achieve online detection of the key quality indexes of the yellow rice wine sample, including total sugar, solids, alcohol degree, total acid, amino acid nitrogen as well as pH value, thus achieving online and rapid quality analysis of yellow rice wine product, reduced detection time and cost and ensured product quality.