Probing the single-cell mechanobiology in situ is imperative for microbial processes in the medical, industrial, and agricultural realms, but it remains a challenge. Herein, we present a single-cell force microscopy method that can be used to measure microbial adhesion strength under anaerobic conditions in situ. This method integrates atomic force microscopy with an anaerobic liquid cell and inverted fluorescence microscopy. We obtained the nanomechanical measurements of the single anaerobic bacterium Ethanoligenens harbinense YUAN-3 and the methanogenic archaeon Methanosarcina acetivorans C2A and their nanoscale adhesion forces in the presence of sulfoxaflor, a successor of neonicotinoid pesticides. This study presents a new tool for in situ single-cell force measurements of various anoxic and anaerobic species and provides new perspectives for evaluating the potential environmental risk of neonicotinoid applications in ecosystems.