1846 US miners’ slang, from 1812 peter (“to become exhausted”). Various speculative etymologies have been suggested, either from St. Peter (from sense of “rock”), French péter (“to fart”), or saltpeter (ingredient in gunpowder, hence used in mining).