Earthquake relocation and focal mechanism inversion can provide seismogenic structure information, especially in the source area without obvious fault trace on the surface, and further reveal the deep geometry of hidden faults. The Yangbi MS6.4 earthquake sequence recorded by Yunnan regional seismic network from May 18 to June 4, 2021 is relocated by using the double-difference location method. A total of 3 233 events, from 4 days before and 14 days after the main shock, are relocated and the b-value in the Yangbi source region is calculated accordinly. Then, using the waveform data recorded by the Yunnan and Sichuan regional broadband seismic stations, the full moment tensor solutions of 10 earthquakes (M≥4.0), including the main earthquake, are obtained using the near-field full waveform inversion method, and further the tectonic stress field is retrieved. The high-precision relocation of earthquakes shows that there are significant differences between the foreshocks and the aftershocks in the tempo-spatial distribution. The foreshocks are primarily in a belt-like distribution along the NW-SE direction, whose epicenters are in a back-and-forth migration. The aftershocks mainly occurred on asymmetric conjugate faults along NW and NE directions, and multi-groups of aftershocks with different strikes were distributed in the south end of the NW-striking seismic zone, implying the complexity of the medium and fault geometry in the focal area. The temporal distribution of the b-value shows that the b-value has a rising trend before the main earthquake, indicating that the stress accumulation in the source area had begun to release gradually at that time, which may be related to the fact that the sequence is of the foreshock-mainshock-aftershock type. After the main shock, the variation range of b-value is large, which may reflect very strong seismicity of the aftershocks and large release of the stress. The focal mechanism solutions show that the moderate earthquakes are mainly of strike-slip with a normal component and a significant non-double-couple component, which may indicate the staggered distribution of the NW- and NE-trending faults in the source region, and the earthquake rupture is not simply the slip along the fault plane. Taking into account for the above-mentioned results as well as the compressional stress field environment in nearly NS direction and the extensional environment in nearly EW direction, the seismogenic structure of Yangbi MS6.4 earthquake is a dextral strike-slip fault, NW striking with a high-dip angle, located in the Baoshan block, which may be a secondary fault parallel to the Weixi-Qiaohou-Weishan Fault and including multi-fault branches in NE direction in the southern segment. The tempo-spatial distribution characteristics of the earthquake sequence and the diversity of the fault plane rupture are controlled by the geometric complexity of fault system in the focal area.