When it came time for Brian Michael Bendis to begin work on his final Spider-Man story featuring Miles Morales, the prolific writer was diagnosed with an MRSA infection, which nearly took his life. Thankfully, Bendis made a full recovery, and has decided to have Miles undergo a similar near-death experience in Spider-Man #240, which will be his last issue before becoming an exclusive writer for DC Comics.

The reveal came from a New York Times article on Bendis, with its closing moments focusing on the writer's time at a Portland hospital battling the MSRA infection. During his stay, Bendis would fall in and out of consciousness, only to be greeted each time by a different member of the Portland comic book community by his side. The article goes on to say that once Bendis recovered, he rewrote Miles' story to have different heroes in the Marvel Universe come check on the young hero, mirroring his own road to recovery.

RELATED: Marvel Teases Bendis' Final Miles Morales Story

That said, Mr. Bendis came perilously close to losing this chance to reboot his own career. Last December, he nearly died of a MRSA infection, admitted to intensive care at a Portland hospital three times. For most of the month, he said, he could not see. Drifting in and out of consciousness, he would wake, often to find a member of Portland’s comic book community sitting by his bedside. That led him to rewrite his final Spider-Man story for Marvel, one in which Mr. Bendis’s version of the character — the half-black, half-Latino Miles Morales — has a similar experience, finding different heroes of the Marvel universe there for him when he needed them most.

Spider-Man #239 found Miles teaming up with his Champions teammates as they followed the Sinister Six to Latveria. It was there that the villainous group's mysterious benefactor was revealed to be Lucia von Bardas, who is making another play to become the nation's dictator. The Sinister Six's new leader -- the Iron Spider, who is also Miles' resurrected uncle Aaron Davis -- and Spider-Man tumbled off the floating S.H.I.E.L.D. helicarrier, leaving their fates open for the time being.

It's possible Miles suffers a severe injury during his fall, which would then set up the superhero community to check on him in a flurry of cameo guest-appearances.

RELATED: Spider-Man #239 Has a Surprising Crossover with Bendis' Invincible Iron Man

Bendis’ farewell will bring his multi-year run as Miles’ primary storyteller to a close, while also setting the web-slinger up for a future post-Bendis. The most recent issues of Spider-Man, the Spider-Men II miniseries and the Generations: Miles Morales Spider-Man and Peter Parker Spider-Man one-shot have seen Miles begin to question whether or not he should continue being Spider-Man, which Bendis may give a definitive answer to in Issue #240.