The sensing of phthalate esters (PAEs) is vital for people's health and environmental protection. This study aimed to develop a highly sensitive and selective photoelectrochemical (PEC) biosensor for PAEs analysis in complex samples. The biosensor is based on a CdS nanoparticle/TiO 2 nanotube (CdS NP/TiO 2 NT) electrode substrate and a truncated PAEs aptamer (PAEs-apt). By exploiting spatial variations in the potential resistance of the sensing interface, the biosensor achieved superior sensitivity in determining the concentration of PAEs compared to the SELEX aptamer. It exhibited a linear correlation in the range of 0.005 to 1 ng/mL with a detection limit of 1.67 ng/L. Furthermore, the biosensor displayed excellent selectivity for PAEs, with an analysis error factor below 0.277 when the concentration of interfering species was 100 times that of the target. The high performance of the biosensor was attributed to the excellent photoelectronic properties of CdS NPs/TiO 2 NTs, high density of PAEs-apt for PAEs, high affinity of PAEs-apt for PAEs, and specific recognition of PAEs. Notably, this PEC biosensor could be used for the PAEs assay in urine and water samples, providing a sensitive and simple analytical method for detecting the same class of compounds with similar chemical structures in complex samples.