MEXICO CITY—The bribery scandal around Brazilian construction giant Odebrecht has led to criminal charges against former presidents in Brazil and Peru. But in Mexico it has brought about a different outcome: the firing of the prosecutor looking into whether any Odebrecht money financed President Enrique Peña Nieto’s 2012 campaign.

Now the prosecutor who was fired is speaking out, saying he was dismissed to stop several investigations he had launched not only into alleged Odebrecht bribes but also into alleged instances of...