To beat a Demi-Lich, you need to either get a mage or a Barbarian with +5 Weapons, then use the Barbarian's rage or have the mage cast immunity to abjuration then go in and slaughter it because that will make you immune to his Imprison spell.
The Staff of the Magi is probably the most powerful staff in the game, but you probably need to be on chapter 6 to get it. You can get it by having a Rogue Stone and going to the door right of the temple of Waukeen, there will be a door to the left of it which is trapped. Don't take that one, take the one to the south of it, you will be teleported to a weird plane, a lich asks you how you got there then for finding the place you must die, prepare for a battle with two powerful spellcasters and a Beholder and a few more enemies, the Lich is carrying The Staff of The Magi and to get out, you put the Beholder's Eyestalk in the pot to the right. It counts as a +5 Weapon, makes you Protected from Evil (invisible) and increaces your AC