Electrochemical sensor can address interferences of color and luminescence from matrix, and then is considered a powerful candidate for food hazard factors analysis. Nevertheless, most of the known sensors for pesticides are limited to tedious and harsh electrode’s immobilization procedures. Herein, an in-situ one-step strategy to prepare methylene blue-encapsulated trimanganese tetroxide nanocomposites (MB@Mn3O4) was proposed for homogeneous detection of pesticide with high sensitivity (using diazinon as model). Experimental characterizations showed MB was encapsulated inside Mn3O4 with high load and good stability, and MB@Mn3O4 exhibited a specific response to thiol because of reduction reaction between –SH and Mn3O4. Given acetylcholinesterase (AChE)-switched hydrolysis of acetylthiocholine into thiocholine, MB@Mn3O4 was explored for homogeneous electrochemical determination of diazinon based on its depression on AChE, where the recognition of MB@Mn3O4 by thiocholine promoted the collapse of Mn3O4, allowing MB to be free. Thus, a greatly decreased signal was measured and the peak current showed a linear relationship to diazinon ranging from 0.1 ng/mL to 20 ng/mL with a limit of detection of 0.03 ng/mL. The strategy on preparing MB-encapsulated Mn3O4 and developing homogeneous electrochemical sensor will open up a new avenue to improve the sensing performance for pesticide.