The detection of chloramphenicol (CAP) is of paramount importance in safeguarding food safety and protecting human health. Herein, a photochemical (PEC) electrode combined with CAP molecular imprinted (TiO 2 -MIPC) films has been reported and then the PEC property has been utilized to realize light-elution function. The PEC theory has been used to accelerate the preparation of MIPs combined with special recognition of MIPs to enhance PEC sensors and their detection capacity. The SEM image shows that MIP films were deposited on a pipe orifice of the TiO 2 . The TiO 2 -MIPC sensor electrode exhibits high selectivity and sensitivity for determination of CAP, and the differential pulse voltammetry (DPV) analysis is highly linear over CAP concentrations of 0.1−20 ng/mL with a detection limit of 0.03 ng/mL (S/N = 3). Moreover, DFT calculations indicate that the combination mode of PANI@CAP may be hydrogen-bond interactions between amino and nitro groups, and the P/N junction of PEC-MIPC generates photogenic charge to break the hydrogen bond as well promote the self-elution function. Thus, this convenient and sensitive PEC sensor will improve the efficiency of hazardous substance detection and offer a design for future PEC sensors.