A Spell for Chameleon is the first in a series novels about the magical world of Xanth. Hoping to discover his latent magical talent, Bink sets out to get advice from the Good Magician Humfrey, and has many adventures along the way. After many trials, including face the Evil Magician Trent, Bink discovers his own powerful magical ability - the fact that he cannot be harmed by magic - and falls in love with the remarkable Chameleon, a woman whose face and intelligence changes depending on what time of the month it is.
While on his way to see the Good Magician Humfrey about whether he has a magic talent, Bink runs into three different women, Wynne, Dee, and Iris, as well as Chester and Cherie Centaur and Crombie The Soldier. He finds out from Good Magician Humfrey that he has Magician-caliber magic but that it can't be identified.
Because his talent cannot be discovered, Bink is exiled to Mundania, the land of no magic. While there, he is captured by the Evil Magician Trent, who was exiled 20 years ago for attempting to overthrow the current king. Trent is trying to invade Xanth with his Mundane army to usurp the throne but has been consistently prevented from entering by the magic barrier which surrounds Xanth. He believes that Bink can help him get into Xanth by providing information on the location of the source of the magical barrier, and attempts to coerce Bink into giving him this information. Trent has prepared a special elixir that can temporarily nullify magic and has a special catapult that can hurl this elixir into the land of Xanth. All that Trent needs now are the exact coordinates of the shield-stone. Bink refuses to cooperate and is thrown into a pit with a woman from Xanth that has followed him there named Fanchon. Bink and Fanchon escape to sea but are pursued by Trent's forces. Eventually, Bink, Trent, and Fanchon are all swept into Xanth via a whirlpool but Trent's forces are left behind.
The trio decides to declare a truce until they can safely make their way out of the wilderness. While travelling, the group discovers Castle Roogna, a castle built 800 years ago by one of the early Kings of Xanth but abandoned 400 years later. Here, Bink learns that Fanchon, Wynne, and Dee are all the same person named Chameleon. Castle Roogna is haunted by relatively benign ghosts and zombies and is an area of heightened magical power. The castle in fact seems to possess some form of awareness and had actually used its control of the surrounding area to herd the trio onto its grounds. It detected the presence of two magician-caliber talents in the group (Bink and Trent) and lured them there in the hopes that one of them could become king and restore the castle to its former glory. The group leaves Castle Roogna on their way to the see the King but are eventually forced to break their truce when Bink refuses to join Trent in taking over Xanth.
While they are arguing, Iris of illusion shows up and offers to marry Trent and help him become King. Iris craves power, but as a woman she is barred from ruling Xanth so she has decided that the next best thing is to marry a King. Trent and Bink agree to a duel to the death: If Bink loses then he will stay out of Trent's way but If he wins then Trent will cease his efforts to gain the throne. In the course of this duel Trent deduces Bink's unknown talent, which is that he cannot be harmed by magic.
Because Bink is still vulnerable to non-magical harm his talent has gone to great lengths to conceal itself over the years. In any case where Bink could have been harmed by magic he has always been saved by what appears to be a series of coincidences. Because of interference from Iris Trent declares that the duel must be restarted, but now thanks to his knowledge of Bink's talent, Trent has the upper hand. He is about to kill Bink when Chameleon dives in front of the sword. Trent and Bink then call a truce so that they can obtain healing elixir to save her life. Bink eventually gets to the Good Magician's Castle in the form of a bird, having been transformed by Trent.
Not only does Bink manage to get the healing elixir, but he also manages to find out that the Storm King has died. All the officials of Xanth, including the Council of Elders (which includes Bink's father Roland), arrive on the scene. The Council captures Trent, heals Chameleon, and offers Trent the kingship if he will marry Iris. The storm king was allowed to remain King well past his prime because there was no suitable successor and by forcing Trent to marry (and presumably produce magician-caliber offspring) the council hopes to prevent that state of affairs from occurring again.
Trent's first act as King is to get rid of the magical barrier between Xanth and Mundania and grant Bink (and non-magical folk in general including mundanes) the right to stay in Xanth. Trent's forces, who consisted of mundanes who wished to immigrate to Xanth begin to settle in various regions of the magical land. Bink and Chameleon are then married and Trent and Iris take up residence in Castle Roogna. Bink and Chameleon obtain a cottage just outside the Castle and Bink is given the title of Official researcher of Xanth.