Dying Wish

"Dying Wish" is a 2012 comic book storyline in "The Amazing Spider-Man", published by Marvel Comics. The story began with a prologue in "The Amazing Spider-Man" #698 and ended in "The Amazing Spider-Man" #700, the final issue of that series, ending over fifty years of Marvel's publication of "The Amazing Spider-Man". The series was replaced with "The Superior Spider-Man", which premiered in January 2013. 
The story concluded a storyline started in "The Amazing Spider-Man" #600, which revealed that the villain Doctor Octopus is terminally ill from his years of crime and fighting superheroes. Aware of his impending death, Doctor Octopus sets in motion a plan that began with the March 2012 story "Ends of the Earth" and finished in "Dying Wish", where the villain successfully swapped consciousnesses with Spider-Man's alter ego Peter Parker, thrusting the hero into his decaying body.
The story was controversial, concluding with the death of Parker in Octopus' body, and Octopus surviving as the rechristened Superior Spider-Man. "Dying Wish" encompassed some of the best-selling comics of 2012, with issue #700 listed as the 4th best selling comic of the year.
Publication history.
Images containing the major story reveals of "The Amazing Spider-Man" #698 and #700 were leaked before their commercial release. The controversial ending of "The Amazing Spider-Man" #700 was leaked on December 14, 2012, twelve days before the issue's December 26 release date and four days before retailers were to receive the issue. Slott responded to the leak by asking readers to wait for the full comic and experience the ending in context. When writing #698, Slott struggled with writing the dialogue for Doctor Octopus in Peter Parker's body, wanting to convey a subtle difference "weird enough that you kind of go, 'Man, they're not getting Peter's voice right this issue'", without giving away the reveal that the two had switched bodies.
Synopsis.
Lead-up.
In "The Amazing Spider-Man" #600 (July 2009), Doctor Octopus is revealed to be dying from the injuries he has sustained from a career of fighting superheroes, particularly Spider-Man. This sets in motion a series of plans first aimed at saving his life (in the 2010 storyline "Origin of the Species") and later at wiping out over seven billion people so that he will be remembered for his infamy (in the 2012 storyline "Ends of the Earth"). Octopus is foiled in his attempts and following "Ends of the Earth", he is incarcerated in the Raft and left waiting death in a life-support machine.
Main plot.
Starting in "The Amazing Spider-Man" #698 (November 2012), Doctor Octopus remains incarcerated in the Raft. Roused from an inactive state, he struggles to utter the words "Peter Parker". Elsewhere, Spider-Man is shown working through his day, while his inner monologue details him living up to his full potential as a scientist and a man, including romantically reuniting with Mary Jane Watson. Responding to Ock's calls for Spider-Man's alter ego, he goes to the ailing villain's bedside. "Spider-Man" reveals that at an unspecified point, the pair swapped consciousnesses: Octavius has transferred himself into Parker's body and vice versa using a special remote controlled Octobot. Octopus intends to live Parker's life and let the hero die in his own deteriorating body.
In "The Amazing Spider-Man" #699 (December 2012), doctors struggle to keep Peter alive as Octavius' body continues to fail. As Peter contemplates the evil that the villain may be doing as Spider-Man, he realizes he has access to Ock's memories and learns of the golden Octobot and how it rewrote his brain patterns with his enemy's. Using Ock's body's remote mental connection to the Octobot, he controls and uses it to summon a group of supervillains to the Raft to free him. Hydro-Man, Scorpion and the Trapster free Parker, believing him to be Octavius and he begins a plan to capture his foe and return his mind to his own body.
In "The Amazing Spider-Man" #700 (December 2012), Otto learns of Parker's escape and attempts to leave the country long enough for Peter to perish. Meanwhile, the Trapster uses various technologies to prolong Parker's life. An electric shock delivered during the process causes Peter to black out, before experiencing a vision of the afterlife where he meets the people he has lost, including Uncle Ben, Gwen Stacy and her father, George Stacy, and even his long-forgotten parents, Richard and Mary Parker. Ben, and the others, encourage Peter to put a stop to Octavius, before he awakens in the real world. Otto decides to remain in New York City and gather all of Peter's loved ones together in Avengers Tower. While Peter is attempting to repair the recovered golden Octobot, Ock sends law enforcement after him, as they are not aware of the swap. To prevent his villainous companions from harming the police, Parker incapacitates Trapster and escapes with Scorpion and Hydro-Man. Together they infiltrate Avengers Tower, but they are confronted by Octavius as Spider-Man. Learning that J. Jonah Jameson is also in the tower, Scorpion and Hydro-Man abandon Parker to pursue Scorpion's agenda against Jameson. When Scorpion attempts to kill Jameson's father's wife, Aunt May, Octavius, in a moment of selflessness, intervenes to protect her, inspired by experiencing one of Peter's childhood memories of her. As Scorpion attacks him again, the enraged Octavius punches him far too hard, brutally severing the villain's jaw clean off, cripplingly injuring him. Seeing that Ock has almost killed someone in his body, an equally enraged Parker lunges at Ock/Spider-Man, in a desperate attempt to finally stop him, even if it kills them both. Octavius manages to form a cushion from webbing, saving them both. Peter sees the opportunity to regain his body and takes control of the Octobot to swaps their minds back, but it fails to work; Ock reveals he added metal-plated shielding on the back of his head to prevent another transfer. Octavius begins to pummel Parker's already dying body, and one final punch floors him, leaving him too hurt to move. Immobilized and with precious little time left, Parker opts for a different method of stopping the villain. Using their connection via the bot, he mentally floods Octavius' mind with memories of his entire life, from his childhood to the multitudinous losses he has experienced and his transformation into Spider-Man, but modifies his memories to feature Otto in his place. Otto is overwhelmed by the heavy memories and has an epiphany, realizing his villainous ways. With Octavius apologizing for his current deeds, Peter encourages his foe to follow in his footsteps by carrying on his role as Spider-Man and to protect his friends and family, as well as the people of New York. Otto agrees and promises to, and with that, Peter Parker finally dies. Respectfully bidding his former nemesis farewell, Otto silently promises that Parker won't be leaving the world to a villain.
In the epilogue, Otto awakens the next morning, still taking the opportunity to briefly revel in his final victory against the Amazing Spider-Man. After calling Mary Jane Watson and asking her out on a date, he puts on his suit and goes out on patrol as Spider-Man. Traveling to one of his hidden bases, the automated defense systems activate, as well as a pre-recorded message of him as Doctor Octopus taunting the intruder. Otto is disgusted at his former self and destroys his defense systems, resolving to finally abandon his identity as Doc Ock. Reobtaining his own tech, a final montage shows Otto as Peter beginning to upgrade new equipment and even redesigning his Spider-Man suit to his own liking, and vows with his intellect and mechanical prowess that he will become a better Spider-Man than Peter Parker was: a Superior Spider-Man.
Aftermath.
The storyline concluded the over fifty-year run of "The Amazing Spider-Man" and saw the death of Peter Parker, and his replacement as Spider-Man by Doctor Octopus in his own 2013 monthly ongoing series "The Superior Spider-Man". Other character progressions included Mary Jane Watson becoming romantically involved with Octopus believing him to be Peter Parker, the reconciliation of J. Jonah Jameson and his long-estranged father, J. Jonah Jameson Sr., and the introduction of a "soul molecule" concept to the villain Hydro Man, a singular molecule that contains his consciousness.
Additionally, a tie-in issue, "The Amazing Spider-Man" #699.1, saw that Parker's escape from the Raft enabled the escape of Michael Morbius. This led directly into the launch of the second volume of the self-titled monthly series "Morbius: The Living Vampire" in January 2013.
Octavius remains active as Spider-Man for most of the run of the new "The Superior Spider-Man" comic, until he sacrifices himself to restore Peter's consciousness in order to defeat Norman Osborn's latest scheme. However, a month or so prior to his death, Octavius had created a digital back-up of his consciousness, with this Octavius- lacking any memory of the events that led to the original's decision to sacrifice himself for Peter- returning to villainy in a new body based on Peter's.
Other versions.
During the 2014 "Spider-Verse" storyline, it was revealed that Octavius's scheme to download himself into Spider-Man failed in Earth-94, a world where Spider-Man was still Ben Reilly. It is unclear if the entire scheme failed or if Reilly was simply able to re-take his body before Octavius's body gave out.
In the "Spider-Man: Life Story" continuity (a universe where the characters naturally age after Peter becomes Spider-Man in 1962), Octavius took over Miles Morales' body instead of Peter's (who was in his 70s by the time Miles became Spider-Man). During a mission where they head into space to activate a "Doomsday Pulse" to wipe out all of Doctor Doom's technology on the planet, Peter deduces that Octavius is in Miles' body from his interactions with a Venom-possessed Kraven and his scientific knowledge. Octavius attempts to destroy Peter's mind, but Peter uses a memory of Aunt May (who was Octavius' ex-wife in this universe) to convince him to accept his life's limitations. Peter sends Otto back to Earth with the space station's only escape pod and sacrifices himself to ensure the Doomsday Pulse goes off. After returning to Earth, Octavius puts himself and Miles back in their original bodies.
Reception.
Fan reaction to the story was very diverse, with some criticizing Peter's death, some celebrating the change, and others argued that his death would likely be reversed, though Slott subsequently maintained this will not be the case. (The decision was indeed reversed when "The Amazing Spider-Man" was re-launched in April 2014) Following the leak of the story's conclusion featuring Spider-Man's death, Slott received death threats that he considered serious enough to report to the authorities. However, Slott stated that the negative responses were a minority and that he had largely received positive feedback. Spider-Man co-creator Stan Lee admitted that he was initially taken aback by the concept of the storyline, but decided to keep an open mind toward it.
Sales.
The first installment of the story in "The Amazing Spider-Man" #698 sold an estimated 81,350 issues in its initial run, an increase of 21,472 from the previous issue's estimated 59,878 sales. Sales of Issue #699 fell slightly to 74,901, but Issue #700 sold 200,957 units, making it the number 1 selling comic of December, and according to North American comic distributor Diamond Comic Distributors (DCD) it was the fourth best selling comic of 2012, followed by #698 at number 94 and #699 at number 130, and the tie-in issue #699.1 at number 182.
A hardcover collection of the issues was released in March 2013.