The title A Memory of Light was previously intended to apply to a book containing the material in what are now books 12, 13 and 14. The original book was incomplete at the time of Jordan's death on September 16, 2007, from cardiac amyloidosis; his widow Harriet McDougal and publisher Tom Doherty chose to publish the book posthumously. Tor Books announced that Brandon Sanderson had been chosen to finish writing the book.
The unfinished book was split into three volumes because it was believed a single volume would be too large to print. Initially it was planned that all three would be titled A Memory of Light, with distinct subtitles; eventually this plan was dropped, and the three volumes were titled The Gathering Storm (published October 27, 2009), Towers of Midnight (published November 2, 2010), and A Memory of Light (published January 8, 2013).
In the prologue, the armies of the Westlands assemble in preparation for Tarmon Gai'don, as do the forces of the Shadow. The Forsaken Demandred stages a raid on the city of Caemlyn, sending Trollocs to capture the cannons, developed jointly by Matrim Cauthon, Queen Elayne Trakand, and the Illuminator Aludra. Talmanes Delovinde and the Band of the Red Hand launch their own counter-attack and successfully exfiltrate the cannons out of the city, but Caemlyn is lost. The Light is bolstered by people coming from all over the world to fight, sensing the end of all things, while the Shadow welcomes a new Forsaken: Mazrim Taim, now called "M'Hael".
Rand al'Thor prepares a meeting of all the nations on the Field of Merrilor, to persuade them to fight in Tarmon Gai'don. Mat returns to Ebou Dar to locate Tuon, only to find the city crawling with assassins sent by one of her generals. At the Black Tower, Logain Ablar is missing and Mazrim Taim is forcibly "Turning" people to the Shadow. The Asha'man still loyal to Logain, led by Androl Genhald and Aes Sedai ambassador Pevara Tazanovni, stage a rescue. Rand's "price" of allegiance—a treaty called "The Dragon's Peace", in which borders are fixed and war is outlawed—and his plan to shatter the remaining seals of the Dark One's prison, lead to widespread argument; the latter resolved only when Moiraine Damodred quotes from the Prophecies of the Dragon, and convinces Egwene to break the seals herself. The Aiel, persuaded by Aviendha's post-apocalyptic visions during Towers of Midnight, demand to be subject to the treaty, as arbiters of any dispute. When Elayne Trakand remarks that peace cannot be maintained if the Seanchan are exempt, Rand agrees to persuade their cooperation, and appoints Elayne commander-in-chief of the armies formerly under himself.
Elayne dispatches her forces to four different campaigns, whereof Caemlyn is to be retaken by Andoran and Cairhienin troops; Egwene commands an army of Aes Sedai to reinforce Kandor, whilst Lan Mandragoran and the resurrected nation of Malkier hold Tarwin's Gap. Rand himself will lead the Aiel to face the Dark One. The four remaining "Great Captains" are attached to each campaign: Gareth Bryne in Kandor, Agelmar Jagad at Tarwin's Gap, Rodel Ituralde to Shayol Ghul, and Davram Bashere to serve Elayne directly. The campaigns turn to disaster when Graendal, now renamed Hessalam, prompts the commanders to err. Rand gains the support of the Seanchan by persuading Tuon in Ebou Dar that his authority, as the reincarnation of Lews Therin, supersedes hers. The Seanchan march to battle with Mat as one of their generals. Taking only Moiraine, Nynaeve al'Meara, and the sa'angreal Callandor, Rand confronts the Dark One's champion, Moridin; interrupted only when Rand makes contact with the Dark One. Meanwhile, Perrin Aybara enters Tel'aran'rhiod to protect Rand from Slayer. In this he is assisted by Lanfear; but wounded by Slayer and forced to retreat. Rand and Egwene learn that enemy agents have seized some of the Dark One's seals. Elayne's forces burn Caemlyn to force the Trollocs to pursue; but they are pursued also by a new force from the north, and saved by Logain and his loyal Asha'man. At Tarwin's Gap, the defenders are forced into rout; while in Kandor, Egwene and the Aes Sedai are unexpectedly outflanked by the nation of Shara, under Demandred. Realizing that Mat's foxhead medallion makes him the only competent general immune to hostile 'Compulsion', Egwene gives him command of their forces, and Mat rallies the survivors at the Field of Merrilor.
To lure Demandred into risking his resources, Mat stages a public quarrel with Tuon, and the Seanchan depart the field. Perrin continues pursuit of Slayer. At Shayol Ghul, Graendal opposes the Aiel. When Demandred challenges the absent Rand, Gawyn Trakand attacks him directly and is mortally wounded. Later, his elder half-brother Galad Damodred is severely wounded in the same effort; but wounds Demandred before retreat. Mat's command post is attacked directly by Sharan forces, and Siuan Sanche is killed in the defense. Gareth Bryne loses reason and dies soon after. Elayne is waylaid by several Darkfriend Guardsmen, who arrange a duplicate of Elayne to be seen dead. Faile's contingent arrive at Merrilor, but are almost immediately betrayed. Faile seizes the Horn of Valere (capable of recruiting deceased heroes), which she gives to Olver.
Androl and Pevara track down M'Hael and steal the remaining seals on the Dark One's prison. Egwene then asks Leilwin Shipless to be her warder and attacks M'Hael. M'Hael uses balefire to destroy a number of Aes Sedai. In the midst of her fight with M'Hael, Egwene activates a "Flame of Tar Valon", capable of counteracting balefire, and sacrifices her own life to destroy M'Hael and his followers. Galad passes to Lan Mat's foxhead medallion, and Lan kills Demandred in single combat. Olver sounds the Horn of Valere, summoning legendary heroes to rescue Elayne. Mat uses the Heroes and reinforcements from the Seanchan to sweep the field.
Outside the Pattern, Shai'tan and Rand duel by constructing their visions of what reality could be after Tarmon Gai'don, and ultimately achieve stalemate on the premise that the Pattern is incomplete in case of either's defeat. Perrin kills Slayer at the Pit of Doom, and later kills Lanfear. Mat kills Padan Fain with his own dagger. Olver and the resurrected heroes win the battle, while Aviendha mentally enslaves Graendal. Rand resumes his duel with Moridin, during which Rand, Moiraine, and Nynaeve take control of Moridin and use his power to create a huge weave of saidar, saidin, and True Power combined. Seeing this, Logain breaks open the Dark One's prison, and Rand uses the huge weave of three powers, first to capture the Dark One, and later to re-create his prison without flaw.
Bereft of the Dark One's influence, the Blight dissolves. Mat reunites with Tuon, who reveals that she is pregnant by him; whereas Perrin locates Faile buried under Trolloc corpses, but alive, and inherits the throne of Saldaea. Cadsuane Melaidhrin is elected the new Amyrlin Seat, while Moghedien is captured by a sul'dam. Thom and Moiraine, Lan and Nynaeve, wait attendance on Rand, who is slowly dying of his wounds. A funeral pyre is held; but it is revealed that Rand had exchanged psyches with Moridin, and is therefore alive. No longer able to channel the One Power, Rand now has the ability to manipulate the Pattern directly, though it is unclear to what extent.
A Memory of Light was originally expected to be published around March 2012. On December 21, 2011, Sanderson announced on Twitter that "A Memory of Light—the final book in The Wheel of Time—has been finished". That same day, Sanderson also announced on Twitter that revisions would take "a good six months" and that the book would probably be released in autumn 2012. Tor released the hardcover book on January 8, 2013, although the e-book was not released until April 8, 2013.
There was public backlash against the publisher, Tor, for delaying the electronic release. Backlash included the review bombing of the title on Amazon and other book seller websites. Brandon Sanderson stated that the decision was that of Robert Jordan's wife, Harriet, who was concerned that the book would not reach the top of the bestseller lists, as all the previous Wheel of Time books have done, if purchases were divided between e-book and hardcover. She felt that this would harm her husband's legacy; Sanderson claimed that she had originally pushed for a one-year delay. Various end users threatened to download a pirated e-book unless the official e-book was available at launch.
Harriet McDougal clarified her reasoning for the late e-book release of A Memory of Light in a March 18, 2013 interview with Tor publisher Tom Doherty. McDougal, the widow of Robert Jordan, explained that "the brick‑and‑mortar bookstores were very good to Robert Jordan throughout his career. They are having a hard time now. This was a chance for Robert Jordan to give back to people who had been very good to him for 20 years. That was really the main reason for the windowing."