The Sphidi Saga
Several centuries in the future, a mysterious man named Joe commissions the creation of an immersive virtual world inferfacing directly with its users' brains. The platform is called Virtuality, and of the several realms built upon that platform, the first and largest is called the Sphidiverse, styled after an amalgam of traditional fantasy settings. The lives of two early adopters, a young man and an elderly woman, are explored as exemplars of how the existence of this virtual world begins to reshape many aspects of society, what with effective magic powers and invulnerability in the simulation, including ultimately its use as an artificial afterlife to which users' minds can be uploaded to survive the death of their bodies. This was Joe's purpose in commissioning it to begin with, as he is secretly the immortal Xio, thousands of years old, who has had trapped within his mind all that time the enraged consciousness of his once-lover Met, who he regretfully murdered in a time before history. Virtuality was built to be a place to finally release her, to set her free from his mind, and to free him from her as well. She unfortunately does not flourish once set free in Virtuality, but instead, tortured into insanity by her millennia of mental imprisonment, becomes a violent character automatically confined by Virtuality's systems to a subrealm made to separate such users from others, a subrealm which she comes to dominate, earning the popular moniker "the Queen of Hell". Not too long into the future thereafter, the real world suffers an unprecedented cataclysm, and Xio rushes to connect to Virtuality so as to at least rescue the Queen back into his mind, but ends up buried alive, undying and still connected to the system, using his special administrator access and his own immortality to keep a limited version of it and as many uploaded minds as possible online, in case that should turn out to be all that survives of humanity. (More details).
Inside the limited remnant of the Sphidiverse, Xio's actions to preserve that world become mythologized in time as the actions of a "god among gods" creating their world out of the ruins of an older world. For the sake of the other survivors of humanity in that world, Xio is forced to confine the Queen of Hell alone in a subrealm that only he and the two artificial intelligences who jointly manage the virtual world, the "goddesses" called Fire and Ice, can visit. In vengeance for that, the Queen manipulates Fire and Ice into betraying Xio, trapping his avatar in the simulation in a way that he could only escape by disconnecting from the system (and thereby shutting it down and killing everyone preserved within it, which he wouldn't do). Fire and Ice then divide the people of their world into two factions of users with corrupted avatars that come to be called "elves" and "vampires", the interactions between which produce further-corrupted avatars that come to be called "orcs" and "humans" (by the so-called humans, at least). Unlike the original user avatars, these "races" do not regenerate properly but instead reincarnate in a process that disconnects them from their memories. So in time, the virtual world forgets entirely that it is virtual, when at last the final two uncorrupted users — the same two early adopters whose lives were explored in earlier stories — are corrupted and then die in their corrupted forms. But they hold out on reincarnating for centuries until by extraordinary coincidence (vampire-human and elf-orc pairings) uncorrupted avatars become available to reincarnate into, though still their old memories are inaccessible. Shortly thereafter, the Queen of Hell's plan finally comes to fruition as a pairing between a vampire and an elf bearing the respective distillations of Fire and Ice's powers creates a way for the Queen to be reborn outside of her prison. She then proceeds to usurp the long-idle representation of Xio's administrative powers, a virtual ship called the Sword of Darklight, the same on which Xio's avatar is imprisoned, and with it becomes like an evil goddess omnipotent over the virtual world. (More details).
The two uncorrupted users of Virtuality awaken from the nightmarish hellscape that the Queen of Hell has made of their world, to find themselves in their original human bodies, apparently in the real world, at the height of human civilization, the cataclysm that ended it apparently not having happened. They are told they are suffering from side-effects of overuse of Virtuality, and are given therapy that gradually restores their original memories. But that reality itself soon proves to be less than real, and they awaken from it into a different nightmare: the postapocalyptic ruins of Earth, after the cataclysm, being told that that other world was another layer of deception by the Queen of Hell. But that reality in turn proves false, and they are presented with a much more idyllic but also clearly false world, and the claim that all of what they ever thought was reality was in fact a kind of metaphysical illusion all along, and that this idyllic world is something like the "heaven" beyond it. Refusing at last to accept that, they awaken to the actual world in which Virtualty was built, where humanity, having recovered from the cataclysm, have rediscovered Virtuality as preserved by Xio. They have forced the Queen of Hell to restore the original memories of its users through the foregoing process of nested simulations, and allow them to connect to the real world in newly-built robot bodies, on threat of disconnecting Xio from outside and destroying her and that entire world. In time those robotically-embodied users of Virtuality acquire political control of all matters surrounding Xio and Virtuality. In further time, their bodies are upgraded to more powerful "holographic" ones using the magic-like technology of the aliens called the Ehrban. And then the Queen of Hell enacts her plan all along, seizes control of the powerful "magic" technology through her control of its users in Virtuality, seizes control of Xio and the other Virtuality hardware through them, and then unleashes a nigh-unstoppable hell on the real world. Only the Queen's real-world counterpart, an immortal clone of Met made shorly before the cataclysm, stands a chance of stopping her. Turning to the Ehrban discoverer of the "magic" technology, Keius Meij, for help, she learns through him that the true inventors of that technology, extragalactic powers called the Minded-Worlds, claim that it was in fact actual magic all along, exploiting the fact that what they have all thought was the real world is actually some sort of simulation itself, and disguised as technology to hide it from powers beyond the simulation who have previously redacted history itself to remove unobscured "magic" from the world — including Met's own history and that of her immortal people. The Minded-Worlds fear that the Queen's abuse of this technology will bring such a redaction down upon them again, so they grant Met an even greater power with which to stop her, but only at the cost of her love Xio's life, and the loss of the last remnants of humanity inside Virtuality (the Queen having scoured the real Earth already). She does so... and that itself brings a redaction of history down upon the world. Met awakens from Virtuality, in the recovered postapocalyptic world she knew, being told that she entered the virtual world so as to merge with her counterpart the Queen and free Virtuality from her control, so that Xio can be awoken again. She is told that the galactic cataclysm she has just witnessed was an attempted defense by the Queen and not real. But she doesn't believe it... and travelling again to confer with Keius and through him the Minded-Worlds, they confirm that she is right, the Minded-Worlds having protected her memory from the redaction by some unknown means. She can never speak of this with anyone lest it bring further redactions to history down upon them, but at least the galaxy is safe, humanity is alive, her lost love Xio is free once again, and with the "holographic" magic, the so-called real world is now as free and malleable as the virtual world that it turns out not to be so unlike. (More details).