Abstract：We invert the focal mechanism of the 2021 Yangbi 6.4 earthquake by the CAP method. Based on the focal mechanism of M≥3.0 earthquakes in Yunnan province from 2015 to 2022, the spatial distribution of the stress tensor variance before and after the earthquake is inverted by the superimposed stress field inversion method. We then use the focal mechanism of M≥3.0 earthquakes in Yunnan from 2013—2022 to further analyze the temporal evolution characteristics of focal mechanism parameters. The results show that the Yangbi 6.4 earthquake is a right-lateral strike-slip earthquake, moment magnitude is MW6.03, moment depth is 5.8 km, for nodal surface I, strike is 39°, dip angle is 75°, slip angle is -16°; for nodal plane II, strike is 133°, dip angle is 75°, slip angle is -164°. The spatial evolution of the stress tensor variance shows that the stress tensor variance near the earthquake area undergoes a process of “low value-significant increase-drop before the earthquake to form a new low value-significant increase after the earthquake.” The temporal evolution of the stress tensor variance shows that the stress tensor variance near the Yangbi 6.4 earthquake area reaches its highest value one to two years before the earthquake, then continues to decline, and then turns and trends back up after the lowest value, with an overall positive “V” shape. Earthquakes occur during a positive “V” turn followed by an upturn in trend. The spatiotemporal evolution of stress tensor variance is consistent.