I was trying to think of a classic that fits that exact vibe and my mind went straight to 'Jonathan Strange & Mr Norrell'. The key characters are the two titular magicians, obviously—Norrell is this reclusive, miserly scholar trying to control magic's return, and Strange is his brilliant, impulsive, and ultimately rebellious pupil. But the real dark heart of it all is the Gentleman with the Thistle-down Hair, a sinister faerie creature who operates by a logic humans can't comprehend. He's not a villain in a simple way; he's a chaotic, amoral force that binds their fates. There's also Stephen Black, the butler drawn into the faerie's schemes, whose storyline adds a whole layer about power and servitude.
Honestly, the book feels less about good versus evil and more about the dangers of wielding a power you don't truly understand, with these characters caught in the web.