The seismic focal mechanism (FM) is an effective property to indicate source physics, as well as stress and strain distribution in regional, local, and microscales. We have developed an algorithm to jointly invert for the FM and source locations. For a given velocity structure, all possible combinations of source locations (, , and ) and FM (strike, dip, and rake) were used to compute traveltimes and polarities of waveforms. Correcting normal moveout times and polarities and stacking all waveforms, the (, , , strike, dip, and rake) combination that gave the strongest stacking power was identified as the optimal solution. Compared with the traditional source scanning algorithm (SSA) that only scanned source locations, this algorithm was thereby called the joint source scanning algorithm (jSSA). The jSSA method was tested rigorously, and it was applied to a hydraulic fracturing data set. Our work determined several advantages against the SSA method: (1) The jSSA method could identify many shear sources that could not be detected by the SSA method due to polarity variation; (2) the jSSA almost always yielded more events than the SSA method, and the added events could often provide much better characterization of the hydraulic fracturing; (3) the statistics of source mechanisms could provide additional knowledge on the orientation of fractures, as well as the local and regional stress and strain field; and (4) for those events that were detected by both methods, the stacking power of jSSA was always higher than that obtained in SSA.