A novel aptamer sensor for ratiometric ochratoxin A (OTA) detection was constructed based on the host-guest competition mode. Firstly, the aptamer modified with methylene blue (MB) at its terminal was fixed on the surface of the gold electrode via the host-guest recognition with β-cyclodextrin (β-CD). Then the MoS2 nanosheets/Au NPs nanocomposites were used for the signal amplification. When OTA was present, the configuration of MB-aptamer transformed from vertical linear to G-quadruplex, thus making itself unable to get close to the electrode surface and causing a decrease in the re...