We improved the ultraviolet (UV)/O3-based method for measuring chemical oxygen demand (COD) in water. An on-line COD monitoring device was developed and the UV/O3 method was used to oxidize sample solutions. A model was established by using support vector machines (SVM) algorithm to estimate dissolved oxygen and CO2 in solutions. Based on the measured data by each sensor during the oxidation process and the estimated dissolved oxygen and CO2, the UV/O3-based COD test accuracy was improved. This approach overcomes many problems associated with the conventional COD determination techniques such as long analysis time, consumption of expensive and toxic reagents, and production of secondary toxic waste. The effect of important parameters on the measurement of COD was systematically investigated. The improved method was successfully applied to determine the COD of real samples from environmental water. Compared with the standard dichromate method, our UV/O3-based COD test method is more effective. The assay time of 10–15 min/sample can be readily achieved. A practical detection limit of 0.89 mg/L COD with a linear range of 1–300 mg/L was achieved under the normal conditions.