This is a re-telling of Shahrazad’s story from Arabian Nights. The ending is not really changed from the original.
The daughter of the storyteller Maju, Shahrazad is used to palace life.
Though Shahrazad grew to young womanhood in the palace, she kept herself far from the pomp and circumstance of court functions. (ch 1)
Shahrazad grew up lonely. The king, Shahrayar, married a new bride each night and killed her. When he married Shahrazad, she saved herself by telling him a tale each night that she would not finish until the morning. So he continued to spare her life to hear the ending.
Shahrayar turns out to not be such a cold man after all, and he becomes so entranced with her stories that he learns how to be a better man from listening to them. He keeps Shahrazad alive, making her his queen for real.
[Cameron Dokey. The Storyteller's Daughter. Simon and Schuster. Simon Pulse, New York. 2007.]