TwoMS4.5 earthquakes happened in Yongning, a county of Yinchuan in Ningxia on June 22, 2010 and November 20, 2012, which were both strongly felt in Yinchuan and its vicinities. In order to understand the seismogenic structure better, we collected the regional earthquake waveform data of Ningxia and nearby seismic networks. Locating main shocks and aftershocks distribution by Hyp2000 and inversing the focal mechanism and depth by TDMT, we got results as follows: for the June 22 earthquake, nodal plane Ⅰ: strike 208, dip 89, and rake -164; nodal plane Ⅱ: strike 117, dip 74, and rake -2. For the November 20 earthquake: nodal plane Ⅰ: strike 284, dip 79, and rake 12, nodal plane II strike 192, dip 79, and rake 169. By means of reference to Snoke method, it is known that the main fractures of the two earthquakes are both strike slip faults with NNE-trending and NNW-dipping, while the former has a small amount of tension component and the latter has a small amount of thrust component. And the moment magnitudes of them areMW4.5 andMW4.3. According to Hyp2000 location, TDMT moment tensor fitting error and sPn depth phases, we consider that the focal depths of the two earthquakes are 22km and 8km, both are shallow-focus ones. Though the epicenters of the two earthquakes are 13km apart from each other, the former one is deeper, the reason is that the November 20 earthquake was controlled by the major fault of Yinchuan Fault, while the June 22 earthquake was controlled by south branch of Yinchuan Fault.