After everything had gone pear-shaped during the events of Civil War and Peter’s Aunt May had found herself with a one extra belly button, Peter soon hit rock bottom. He almost killed the Kingpin as he had sent an assassin which led to Aunt May being in the hospital and then he had started to look for a way to save his aunt.
But his search was just fruitless as the worlds of magic and science did not give him any solution. To add to this, Jesus Christ had come down from Heaven and told Peter to let Aunt May go. Peter had responded by making a deal with a character who is Marvel’s version of Devil.
Peter struck a deal with Mephisto so that no one ‘had learned his identity and that Aunt May was not shot.’ In return, he had allowed Mephisto to wipe the marriage between him and Mary Jane from existence.
Peter then gets to see his daughter who would not be born, just so that the really, really old Aunt May could live.