Ochratoxin A (OTA) is a toxic metabolite commonly found in various foods and feedstuffs. Accurate and sensitive detection of OTA is needed for food safety and human health. Based on a common OTA‐binding aptamer (OTABA), two structure‐switching OTABAs, namely OTABA4 and OTABA3, were designed by configuring a split G‐quadruplex and a split G‐triplex, respectively, at the two ends of OTABA to construct aptasensors for the detection of OTA. The OTABA, G‐quadruplex, and G‐triplex all can capture the thioflavin T (ThT) probe, thereby enhancing the fluorescence intensity of ThT. Bonding with OTA could change the conformations of OTABA and G‐quadruplex or G‐triplex regions, resulting in the release of the captured ThT and diminution of its fluorescence intensity. Dual conformation changes in structure‐switching OTABA synergistically amplified the fluorescence signal and improved the sensitivity of the aptasensor, especially for that with OTABA3. The detection limits of the OTABA4‐ThT and OTABA3‐ThT systems for OTA were 0.28 and 0.059 ng ml−1, with a 1.4‐fold and 6.7‐fold higher sensitivity than that of the original OTABA‐ThT system, respectively. They performed well in corn and peanut samples and met the requirements of the food safety inspections.