Guizhou province is located in a karst development area in China, and there are many moderate earthquakes, among which extremely shallow earthquakes are likely to cause damage to buildings, transportation lines, and other engineering facilities. Accurate focal depth and moment tensor can provide vital information for earthquake disaster assessment and karst collapse monitoring in karst areas. The network in the study area is relatively sparse, and the velocity structure is complex. For shallow earthquakes, the shallow velocity structure may cause certain errors in the inversion of the focal depth and mechanisms. In this study, based on the surface‐wave information of regional stations, the shallow velocity structure is inverted. Based on the updated velocity model, we obtain the focal depth and mechanism of the 4.5 earthquake on 21 August 2021 in Guizhou province. The results show that the optimal focal depth is about 2 km, and the moment of horizontal closing crack () accounts for about 31% of the full moment tensor. The first motions of the P wave at the near‐seismic stations of the earthquake are negative, similar to the typical collapses. However, compared to mining collapse earthquakes, the proportion of closing‐crake components is relatively low. The dominant double‐couple source of the earthquake is a thrust fault, which is consistent with the distribution of faults in the study area. It is speculated that a collapse in the karst area, resulting in negative P‐wave polarities and about 31% closing‐crake source, induced the shallow earthquake.