In game. It was planned from the beginning of that particular campaign run. I had a couple players who'd been playing in the setting for almost 15 years, so knew the lore well enough for it to matter. The important parts are that there was an evil empire (yeah, it's cliche) that had been around for at least 3000 years in one form or another (a bit like China has been around since before recorded history). That empire had been such a hotbed of magical experimentation that it had a ton of psionic mutations, which the current leadership had harnessed that to great effect. This empire had been important in about half the campaigns I'd run, and was always a threat in the background.Did you kill it off in game, or just stop playing it. If you killed it off in game, I'm curious as to what kind of storyline did it?
When I was in college, in the early 1990s, I ran paired campaigns between my home group and the college gang (including a couple of the players in the finale campaign). The college group weakened the web around the emperor. Then the the home group brought some higher level characters out of retirement to kill off the emperor. The next school year, the college group had to figure out how to deal with the fact that one of the characters who continued on was playing host to the emperor's psyche, which had jumped bodies (he was a powerful psion). They pretty exorcised him. During that campaign, one of the players was also playing an elven knight and started delving into the lore -- I did do a lot of work around the history of the elves to make them distinct, but it barely got scratched.
For the finale, the plan was to run the PCs from first level to epic level in 3.5. I ended up getting fed up with the complexity of high level play and truncated it a bit, but the gist is that the emperor had managed to ascend to a quasi-godhood and was orchestrating a massive push on the the main play area. It was a pretty long revel that took roughly five years to pull off. The PCs started off fighting orcs, discovered they were being pushed into activity by another group, who was being controlled by agents of the empire, etc. In between, one of the PCs got long conned (over a year, real time) into selling her soul to a demon (Book of Vile Deeds was quite nice in pulling that off) but she got to established a new mage's guild. The same player who played the original elf, played another elven knight and we wrapped a side story that had gotten sewn years earlier. And, another long-term player got to play a concept he'd started in a toward the end of school and never got to properly play. Oh, and there was a big red dragon disguised as a king who acted as their patron through most of the game.
In the end, there were massive wars that included angels and demons (those were narrated because no one wanted a minis wargame), they killed the emperor with clear finality, and the omnipresent empire was broken, along with a couple of famous artifacts. Much fun and totally burned me out on running high level D&D.