The Imprisoning War was perhaps the single-most important event in all recorded history. Not only do we have more recorded documents that make mention of this event than any other similar historical event for that era, but also the very calendar upon which we reckon our dates and years is based around this very event. Against popular notion, the Imprisoning War--or the Sealing War, as it is named in a few texts--did not immediately begin with the Hero of Time's death at the hands of Ganondorf. The war began several months after the fact, beginning in earnest in 2 BW. This was largely because Princess Zelda was still held captive within Ganondorf's Castle after the famous battle, and it was believed that she would be murdered if any attempt at resistance took place while she was still held captive.
After a daring though successful attempt to free her, the Knights of Hyrule along with the remnants of the might from the other great races of Hyrule fled the kingdom to the border of the neighboring land of Calatia to the northwest. Calatia, allies to the Hylian throne in those years, sent along a token force in aid, but more help was to be found by uniting Goron and Zora tribes from the Calatian lands. Princess Zelda appointed several of the Seven Sages--of particular note the Goron Darunia, the Gerudo Nabooru, and the Sheikah Impa--as commanders of her brigade, and together they led the troops back across the border into Hyrule.
The Imprisoning War lasted five years and wrought great devastation across the land. Beginning in the late spring of 2 BW, the Hylian forces struck at the belly of Ganondorf's own army, which seemed to be primarily composed of monsters, undead, and a contingent of Gerudo who were still faithful to his rule over the desert band. The Hyrulean coalition did not win their first or second battles, but it was finally at the Battle of Kakariko where the Hyruleans supposedly had their first victory. History tells the story as if fighting for the preservation of their home soil rallied them against the horde of monsters. It wasn't until the year AW 1 when an assault against Ganon's Castle was finally possible. The assault lasted for a full month, but ultimately the Knights of Hyrule were able to press through and cause Ganon's own army to flee through the Temple of Time into the Sacred Realm.
Desiring a true victory, Princess Zelda alongside her commanders pressed into the Sacred Realm and attacked at Ganon's own troops from the very resting place of the sacred Triforce in the autumn of AW 1. However, with the impending winter approaching, they were forced to call off their attack until the spring of the next year. At that point Ganon was waiting. His full mastery of the Triforce had not only replenished his forces to numbers equal to the beginning of the war but also was enhanced due to the Triforce being returned to the Sacred Realm, where it had more influence and power. The war began to sour for the Hylian forces, at first becoming a stalemate for a long period of time before finally Ganon's army turned the tide in AW 3.
Believing that there could be no true defeat of Ganon without the Hero of Time, Princess Zelda enacted a bold plan to seal away Ganon and his forces within the Sacred Realm, thus effectively sweeping him beneath the rug, hopefully never to be encountered again. News of her plan was leaked through a Gerudo spy in Zelda's camp, and so Ganon knew that he had to win and win decisively. His armies boldly approached the Warp Gate that connected the Sacred Realm and the Temple of Time to thwart the casting of the sealing spell. It was this very battle--the Battle of the Temple of Time--for which the Imprisoning War gets its name. The Seven Sages remained at the front of the Temple while the Knights of Hyrule defended them as Ganon pressed his charge. The casualties of this battle were great and nearly exhausted the Knights to their last man; however, the Sages managed to complete their spell. In consequence to the sealing of the gate, the Temple of Time was torn asunder and destroyed.
The decision to reckon time off of the Imprisoning War was decided at the Council of Kasuto in the 275th year post-war. The then Queen Lorand initially proposed marking the first year of the new era based upon the life and death of the Hero of Time; however due to the Hero's failure to thwart Ganondorf, his popularity in the stories recorded from the era made the decision fairly unpopular with the remainder of the council. Her Majesty eventually yielded to the council's protests and allowed the demarcations to be recorded as "AW" (after the war) and "BW" (before the war); however, in revenge she attempted to forgo her agreement and actually mark the year AW 1 as the very year the Hero of Time died. Curiously enough, it was discovered decades later that the Royal Family's own records of the annals of history--recreated due to the razing of Hyrule Castle during the war--were incorrect and differed by a few years from the more reliable historical accounts. As such, AW 1 occurs as the proverbial midpoint of the Imprisoning War instead.