In the past three years, some moderate-sized earthquakes (MW>4.0) took place in the southern Sichuan Basin, China and were suspected to be associated with hydraulic fracturing stimulation for producing the shale gas. The objective of this study is to investigate the relation between an earthquake sequence and hydraulic fracturing stimulation at two shale gas well pads with the results of focal mechanism determination and stress inversion. We calculated the focal mechanisms of observed earthquakes using a full-waveform matching method. This method not only fits the waveforms of the observed data, but also matches the P-wave first-motion polarities and S/P amplitude ratios. Thus, it can yield more reliable solutions. The stress inversion is performed using an iterative method. The advantage of this method is that the actual fault planes can be identified from resolved nodal planes based on the fault instabili ty constraint. The focal mechanisms of observed earthquakes show dominant strike-slip movements with the fault planes orienting in the NW-SE direction. Sensitivity tests show that the focal mechanism solutions are reliably determined. The inverted maximum principle stress σ1 is oriented NW-SE and nearly horizontal, which is consistent with the observations from borehole breakouts and World Stress Map. Based on the inverted focal mechanisms and in-situ stress measurements, the pore pressure increment that is necessary for activating the faults is estimated to be about 19.6 ± 3MPa. Based on these observations, we argue that the triggering mechanism of the observed earthquakes is more likely related to fluid diffusion that changes the pore pressure on pre-existing faults and causes the fault slip.