The Tower of Magi Disaster occurs between day 160 and day 163. You'll know it's time when you get a message about receiving a mental jolt. Once you receive that message you have, I believe, 40 game days to destroy the portal. You won't receive the message if you're in the Tower of Magi, so it's usually best to be wandering around in Upper Avernum or Krizsan Province. I don't know if you receive the message if you're in a town, since by that point I've usually run out of things to do and am usually making loops around Outdoor Upper Avernum waiting for the disaster to occur.
When you first enter the Tower you'll see someone signalling you before they duck into a doorway to the southeast of you. Go through the doorway into what used to be the library and down to the southwest corner. You'll find Solberg here. He'll tell you what's happened, and what he knows about where people are.
There's a Robe of the Magi in the room that used to contain the Item Augmentation platform in the southwest corner of the Tower, guarded by two demons.
I chose not to show the locations of the various Demons and Imps, since they're really all over the place. Keep an eye out for the enemy and make your way to the southeast corner of the Tower and into what used to be X's library. Linda is in the southwest corner of this library. She'll tell you about the Blessed Athame, which she hid in the altar of the temple.
Now make your way up to the northeast corner into the temple. There's a few Demons and Imps in the temple, and once you take the Blessed Athame from the altar a few more will appear.
Now that you have the Blessed Athame make your way to where Linda's Chambers were before the disaster, stopping in the northwest corner of the Tower to pick up a Boots of Speed in a secret room. When you get to Linda's Chambers read the book on a pedestal in the northern section of the room. When you first try to read the book it will summon a Haakai, but once you've killed the Haakai you can read the journal. It will tell you about a secret passage up to the Portal.
Go out the door to the east, which leads to the passage outside Linda's Chambers. The secret passage is in the north end of the tunnel and takes you right up to the Portal, which is guarded by a few more Demons and Imps.
Kill the Demons and Imps and then approach the Portal. Whenever given the option choose to destroy the Portal, doing anything else results in instant death and the end of the game. You'll be teleported back to the Portal Fortress, but the Portal itself is now destroyed. You'll be able to find X and Solberg in Fort Emergence if you need them.