Visualizing how a catalyst behaves during chemical reactions using in situ transmission electron microscopy (TEM) is crucial for understanding the activity origin and guiding performance optimization. However, the sample drifts as temperature changes during in situ reaction, which weakens the resolution and stability of TEM imaging, blocks insights into the dynamic details of catalytic reaction. Herein, a Thon-ring based sample position measurement (TSPM) was developed to track the sample height variation during in situ TEM observation. Drifting characteristics for three commercially available nanochips were studied, showing large biases in aspects of shifting modes, expansion heights, as well as the thermal conduction hysteresis during rapid heating. Particularly, utilizing the TSPM method, for the first time, the gas layer thickness inside a gas-cell nanoreactor was precisely determined, which varies with reaction temperature and gas pressure in a linear manner with coefficients of ~8 nm/°C and ~50 nm/mbar, respectively. Following drift prediction of TSPM, fast oxidation kinetics of a Ni particle was tracked in real time for 12 s at 500°C. This TSPM method is expected to facilitate the functionality of automatic target tracing for in situ microscopy applications when feedback to hardware control of the microscope.