The story goes that every day Shahryar would marry a new virgin, and every day he would send yesterday's wife to be beheaded. This was done in anger, having found out that his first wife was unfaithful to him. He had killed one thousand such women by the time he was introduced to Scheherazade, the vizier's daughter.
In Sir Richard Burton's translation of The Nights, Scheherazade was described in this way:
"Scheherazade had perused the books, annals and legends of preceding Kings, and the stories, examples and instances of bygone men and things; indeed it was said that she had collected a thousand books of histories relating to antique races and departed rulers. She had perused the works of the poets and knew them by heart; she had studied philosophy and the sciences, arts and accomplishments; and she was pleasant and polite, wise and witty, well read and well bred."
Against her father's wishes, Scheherazade volunteered to spend one night with the King. Once in the King's chambers, Scheherazade asked if she might bid one last farewell to her beloved sister, Dinazade, who had secretly been prepared to ask Scheherazade to tell a story during the long night. The King lay awake and listened with awe as Scheherazade told her first story. The night passed by, and Scheherazade stopped in the middle of the story. The King asked her to finish, but Scheherazade said there was not time, as dawn was breaking. So, the King spared her life for one day to finish the story the next night. So the next night, Scheherazade finished the story, and then began a second, even more exciting tale which she again stopped halfway through, at dawn. So the King again spared her life for one day to finish the second story.
And so the King kept Scheherazade alive day by day, as he eagerly anticipated the finishing of last night's story. At the end of one thousand and one nights, and one thousand stories, Scheherazade told the King that she had no more tales to tell him. During these one thousand and one nights, the King had fallen in love with Scheherazade, and had three sons with her. So, having been made a wiser and kinder man by Scheherazade and her tales, he spared her life, and made her his Queen.