A directly rapid quantitative analysis method for chemical oxygen demand (COD) of wastewater samples was established by near-infrared (NIR) spectroscopy and partial least square (PLS) method. The optimization of Savitzky-Golay (SG) smoothing modes combined with PLS factor was applied to optimize the model of NIR spectroscopy analysis here. The waveband used for modeling was the combination of 400-1878 nm and 2088-2338 nm. The optimal smoothing parameters were the 5th derivative smoothing, 5th degree polynomial, 17 smoothing points, the optimal PLS factor, root mean squared error of predication (RMSEP) and correlation coefficient of predication (RP) were 7, 33.2 (mg/L) and 0.929 respectively, which was obviously superior to the direct PLS model without SG smoothing and ones based on the whole spectral collecting region 400-2500 nm. This demonstrated that NIR spectroscopy can be applied to the rapid determination of COD of wastewater, large-scale simultaneous optimization selection of SG smoothing parameters and PLS factor can be effectively applied to the model optimization of NIR analysis.