You appear to be referring to events that supposedly took place in the Philippines around the turn of the last century, during which which "Black Jack" Pershing - who would go on to command US forces in Europe during World War I - supposedly used Islamic taboos on pigs to effectively shut down an insurgent/terrorist movement.
Pershing's supposed actions are sometimes referenced today by those who advocate taking much stronger measures against modern Islamist groups. Unfortunately, as u/cptbuck has shown, there is very little evidence that events panned out as these modern commentators think they did, and Pershing himself was not the officer who used pigs against local insurgents in this way.