Ali Baba and the Forty Thieves by Arabian Nights. Though this version of the story is titled, The History of Ali Baba, and of the Forty Robbers Killed by One Slave, we chose to use the shorter and more familiar title, Ali Baba and the Forty Thieves.The story has been told in many versions, with slight variations in title and detail.