Phthalate acid esters (PAEs), known food contaminants, can lead to reproductive problems, respiratory diseases, childhood obesity, and neuropsychological disorders. This work aims to develop an electrochemical aptamer sensor for the detection of DAP and its analogs. To achieve specific recognition ability for PAEs, we have introduced the thymidine-Hg2+-thymidine strategy for the first time in an electrochemical aptamer sensor, incorporating metal–organic frameworks (MOFs) as the carrier for the aptamer. Additionally, nano signal amplification technology was applied by immobilizing MXene on the electrode to intensify the sensor’s current signal. In the presence of PAEs, these molecules specifically bound to the aptamers, resulting in competitive release of Hg2+ and aptamers connected to Hg2+, subsequently reducing current signaling. Under optimal experimental conditions, the designed sensor achieved a linear range from 1.65 × 10−5 mg/mL to 3 × 10−3 mg/mL and an extremely low detection limit of 8.94 × 10−6 mg/mL. Furthermore, it exhibited good reliability and practicality in detecting actual samples.