https://en.wikipedia.org/wiki/The_Three_Apples
A fisherman discovers a heavy locked chest along the Tigris river. He sells it to the Abbasid Caliph, Harun al-Rashid, who then has the chest broken open only to find inside it the dead body of a young woman who was cut into pieces. Harun orders his vizier, Ja'far ibn Yahya, to solve the crime and find the murderer within three days or else he will have him executed. Ja'far, however, despairs of his inability to find the culprit and remains in his home for all three days. On the fourth day, Harun is about to have Ja'far executed for his failure when two men appear, one a handsome young man and the other an old man, both claiming to be the murderer. They argue and call each other liars as each attempts to claim responsibility for the crime. This continues until the young man proves that he is the murderer by accurately describing the chest in which the woman was found.
The young man reveals that he was the woman's husband and the old man her father (and also the husband's uncle, making the couple cousins), who was attempting to save his son-in-law by taking the blame. Harun then demands to know his motives for murdering his wife, and the young man answers. He eulogizes her as a faultless wife and mother of his three children, and describes how one day, she requested a rare apple while being ill. This prompted him on a two-week-long journey to Basra, where he found three such apples at the Caliph's orchard. On his return to Baghdad, he found out that she was too ill to eat them. When he returned to work at his shop, he discovered a slave passing by with a similar apple. He asked him where he had gotten it and the slave replied that he received it from his girlfriend, who had three such apples, which her husband found for her after a half-month journey. The young man, suspecting his wife of unfaithfulness, rushed home to look at how many apples she still had. After finding one of them missing, he drew a knife and killed her. He then attempted to get rid of the evidence by cutting her body to pieces, wrapping it in multiple layers of shawls and carpets, hiding her body in a locked chest, and abandoning it in the Tigris river. After he returned home, however, his eldest son confessed to him that he was the one who took one of the apples behind his mother's back, and a slave had taken it and run off with it. The boy has told the slave about his father's quest for the three apples in a bid to get it back, but the slave instead beat him and ran off before the boy could catch him. Out of guilt, the young man concludes his story by requesting Harun to execute him for his unjust murder. Harun, however, refuses to punish the young man out of sympathy, and instead sets Ja'far on a new assignment: to find the slave who caused the tragedy within three days, or be executed for his failure.
Ja'far yet again remains home for all three days and fails to find the culprit before the deadline has passed. He is summoned to be executed for his failure. As he bids farewell to all his family members, he hugs his beloved youngest daughter last. It is then, by complete accident, that he discovers a round object in her pocket, which she reveals to be an apple with the name of the Caliph written on it. In the story's twist ending, the girl reveals that she brought it from their slave, Rayhan. Ja'far thus realizes that his own slave was the culprit all along. He then finds Rayhan and solves the case as a result, arresting him and taking him to the Caliph. Ja'far, however, pleads to Harun to forgive his slave and, in exchange, narrates to him the Tale of Núr al-Dín Alí and His Son Badr al-Dín Hasan. The Caliph, amazed by the story, pardons the slave. To console the young man who mistakenly killed the wife he loved, the Caliph offers a concubine from his harem as a wife, showers him with gifts and cherishes him until his death.