Queen of Demons (1998) is a fantasy novel by American writer David Drake, part of the series Lord of the Isles.
For the most part it follows the adventures of two men (Garric and Cashel) and four women (Liane, Ilna, Tenoctris, and Sharina) as they are split up into parallel worlds and slowly reunite, culminating in the defeat of two of their enemies: the Queen and the Beast.
In the introduction, the current King of the Isles, Valence III, and his wizard, Silyon, make a deal with the Beast to regain control of his kingdom from his wife, the Queen.
Meanwhile, the main characters are in Erdin where they discover the dead remains of a Scaled Man on their ship, which Tenoctris sees as a bad omen.
Following this, Garric appoints himself Prince Regent under King Valence III and demands the allegiance of the Lords who backed him in the revolt.
Garric promises to destroy Admiral Nitkers and the rebellious navy if they don't return to the King's service.
When Helphemos' talking ape, Zahag, throws a fit during a chess game with Liane, Cashel attempts to settle him down.
Helphemos, casts a spell to immobilize the ape but the wizardess Silya secretly interferes and sends them to another world.
He and Zahag meet the lady Sosia who asks Cashel to save her daughter, Aria, who is imprisoned by a wizard Ilmed and the Scaled Men who serve him.
After they defeat the wizardess Silya, Princess Aria (who has decided to marry Folquin) arranges a boat to help Cashel find Sharina.
They arrive in Valles where they run into Ilna, Cerix, and Helphemos and then make their way to the palace where they find Garric, Liane, and Tenoctris.
But a wizard with the appearance and voice of Nonnus, Sharina's one-time protector, shows up and tricks her into leaving with him on another ship.
Sharina watches as the fleet of Hairy Men reaches the Royal Navy and destroys it, but Admiral Nitkers escapes.
In the castle, the wizard Silyon and Admiral Nitker kidnap Liane and turn her over to the Beast, fifty meters down a well.
At this point Ilna tears her sash and it reveals how to rescue Liane, by giving the key words (in the Old Script) needed to enter its lair.
The Beast attacks them, revealing that the Yellow King had imprisoned it there long ago and that it had lured them there to release it from its prison.
She and Cashel also notice the appearance of a new piece on the board—representing an island-sized black ammonite that an unknown wizard has just called up from the depths of the ocean.
There may be some relationship to the writings of Robert William Chambers and the Cthulhu Mythos as there are frequent mentions of the Yellow King (p. 31, 590, 607, etc.)