The Banewarrens are the dungeons honeycombing the lower part of the Spire in Ptolus. They feature in Monte Cook's d20-system (i.e, 3e Dungeons & Dragons) adventure of that name, WW16111. They're the reason Ptolus even exists.
Ptolus is on the world Praemal, a prison-planet for eeevil like the world of Midnight and, more to the point, the Land in Stephen R Donaldson's Thomas Covenant series. As such, should something Bad get in Praemal or form in here, the locals cannot fling the dead cat into some other plane's yard. Destroying the Bad would, if Bad enough, let loose Bad energies which might just spread Bad around, to infect something else.
Thus, Donaldson's concept of the "bane" entered here: it's something Bad that you haven't the time and will to flush down whatever toilet passes for Mount Doom here. It's magical nuclear-waste.
One enterprising paladin named Danar figured, derrrp, let's sweep all this Bad under a thick magical rug and lock it up with magical wards. And let's do this under my own castle, Mosul Pearl. Danar convinced enough idiots that the Banewarrens were born. But then the banes seeped their maleficent energies throughout the cavern-network, interconnecting into a "Banemight".
The Earth herself cried out in pain (metaphorically) and tried to eject all this crap (literally), but Danar's wards were too good so it all rose up in an unnatural spire. Danar's wards did pretty well at keeping the Banemight in, too... until it started trickling into Planes Man Was Not Meant To Know. Danar was seduced by these forces and became a bane himself, Eslathagos Malkith; his castle got renamed "Jabel Shammar" like the badlands of Saudi Arabia. (Why all the Arabic? Monte probably just thought it sounded cool.) The sequence of events is contested: Ptolus says Spire first then Malkith, as here; The Banewarrens in reverse.
There was a war - which Malkith né Danar lost, some various other stuff happened, and now it's the present day and the wards are failing.
There's some mild retconning, in that the 'Warrens in the module are 500-1000 years old but over 10000 in the later Ptolus book. As Monte revised the setting, he'd decided to make Malkith's legacy the Elder Evil thereof.
Oh, and The Banewarrens' last chapter and the near-last part of the penultimate chapter do allow the party to bugger right off this prison for some other plane. Probably, again, because Monte hadn't finished; he'll throw some provisos around these exits in Ptolus, 61-2. By that point, the party is in a concentration of baneful might - so the DM might allow it anyway. They'll probably end up in a demon's S&M dungeon, and back home the Galchutt stand a good chance of learning about the exit.
The story starts when a bane gets loose and turns certain local citizens into X-Men mutants a la Chronicle (a fine movie, go see it). The party then investigates some of the tamer Banewarrens where they can find more banes, which they really shouldn't keep for themselves. These banes aren't the worst - they're on the unfinished edge of the system, perhaps because Danar himself at the time was musing that those particular banes might be destructible without adding to what he could already tell was going Banemight. But they're bad enough. Normally that would be the end of it: the party gets a taste of the Awful, and understands that it's all best left under lock and key.
But in the meantime other factions get interested. Demon-touched House Vladaam, and the Pactlords of the Quaan who KILL ALL HUMANS, each covet the banes for themselves. Also involved are the Inverted Pyramid who research magic, and the Church of Lothian - although their motives are opposite from what one might think: the Pyramid want it all locked away again, to which the Church says noli modo until it first retrieves some ancient sword that Malkith stole. So the players' party need to explore the ruins before anyone undeserving gets there first.
Yadda yadda yadda, events keep drawing the party and other factions further into the Warrens, they find more banes, with many callbacks to other Malhavoc products in the Eldritch Might line. Leading up to a sequel, which ended up in the Ptolus hardcover. All very Temple of Elemental Evil.
The module sold. Lots of people played it; there was a whole forum on Malhavoc's site dedicated to it. It's agreed as a classic, one of the best modules in the 3e / d20 line up there with Necromancer's Rappan Athuk. Because it sold, Monte expanded the lore of the city into what's the Ptolus tome today.