Chemical Oxygen Demand (COD), as a detection indicator of water pollution, is of particular importance in assessing organic pollution in water. Furthermore, accurate and simple measuring COD methods are essential for water quality assessment and pollution control. However, the photoelectrochemical oxygen demand (PECOD) measurement, as one of the measuring COD methods, is affected by the reaction of water splitting, which is one of the hindrances to the commercialization of the analytical method of the PeCOD measurement. Hence, to overcome this challenge, a new PANI/Ti:Fe2O3 photoanode is constructed by hydrothermal and photoelectrochemical (PEC) deposition methods and investigated their optical properties and photoactivity. Under optimization conditions, it is discovered that the oxidation of organic compounds produces a net steady‐state current (inet) is directly proportional to COD concentration, with a detection limit of 1 mM glucose solution and a wide linear detection range of 1–78.125 mM, which is suitable for high concentration of glucose detection. As has been noted, PANI/Ti:Fe2O3 photoanode overcomes the obstacles to the practical application and eventual commercialization of the PECOD technology.