The Yellow Dwarf is a French literary fairy tale by Madame d'Aulnoy. Andrew Lang included it in The Blue Fairy Book.
A widowed queen spoiled her only daughter, who was so beautiful that kings vied for the honor of her hand, not believing they could attain it. Uneasy that her daughter would never marry, the queen went to visit the Fairy of the Desert for advice. She made a cake to protect herself from the lions that guarded the fairy, but she lost it. A yellow dwarf offered to save her in return for her daughter's hand. She accepted, but when the dwarf showed the miserable home in which her daughter would live, she grew quite ill.
Her daughter, distressed, went to seek the same fairy. The dwarf told her what her mother had promised, and when she was ready to reject it, the lions arrived. She agreed if he would save her. Back at the castle, she fell quite ill and agreed to marry the King of the Gold Mines. However, at the wedding, the Fairy of the Desert and the Yellow Dwarf interrupted. The dwarf carried off the princess, and the fairy fell in love with the king and carried him off. She chained him in a cave and turned herself into a beautiful woman, but her feet being unchanged, the king was able to tell who she was. He told her that he would hate the fairy as long as she kept him chained up, but would love her if she freed him. The Fairy of the Desert freed him and brought him to her castle, carrying him by the castle where the princess lived; she saw them and became convinced that the king was unfaithful to her.
The king was kept more pleasantly, but was unable to escape. He lamented his fate along the sea, and a mermaid left enchanted sea rushes behind to look like his body and freed him. She gave him a sword to fight his way to the princess.
The fairy was entirely deceived by the sea rushes and did not pursue him.
The king fought his way through sphinxes and dragons to find his path blocked by maidens with garlands of flowers; he still pressed on, tearing apart their garlands, and reached the princess. He persuaded her of his fidelity, but the Yellow Dwarf found them and killed him. The princess died of grief.
The mermaid was only able to change their bodies to two palm trees.