This simple rhyme is actually discussing infidelity between a husband and wife. The line, "had a wife, and couldn't keep her" is referring to Peter's wife cheating on him. Some versions display her as a prostitute, hence her infidelity. Depending on the variation of the rhyme, Peter's solution is either a chastity belt — the "pumpkin shell" — or he kills her. One version of the rhyme includes the line, "had another, didn't love her, up the chimbly he did shove her." Guess he didn't keep her very well, after all.
MORE: 13 Creepy Kids' Drawings
Image via Wikimedia Commons