The play opens in the city of Ephesus, with Solinus, the Duke of Ephesus, leading a merchant named Egeon to be executed. Egeon converses with the Duke, and we learn that he is a native of Syracuse, Ephesus' great commercial rival. Because of strife between the two cities, any Syracusan caught in Ephesus must pay an indemnity of a thousand marks, a price that Egeon is unable to meet, or face execution. He seems resigned to his death and declares that the execution will bring an end to his "woes." Curious, the Duke asks him to relate how he came to travel to Ephesus, and Egeon complies.
The merchant describes how he was born in Syracuse, and a wife, and prospered through trade with the neighboring city of Epidamnum. Eventually, however, his representative in Epidamnum died, leaving the business in disarray, and Egeon was forced to travel there to set his affairs in order. His pregnant wife went with him and gave birth to identical twin sons. At the same time, a poor woman staying in the same inn also gave birth to identical boys, and Egeon bought her newborns, intending to bring them up as slaves for his sons.
Unfortunately, on their return journey to Ephesus, Egeon recounts, their ship was broken apart by a storm, and the sailors abandoned them on the wreckage. His wife tied herself, with one son and one slave, to one of the masts, and he tied himself, the other son, and the other slave to a mast at the other end of the wreck. They floated for a time, while the sea grew calm, and then they saw two ships coming toward them--one from Corinth and one from Epidaurus. Before the ships reached them, however, they ran into a rock that split the wreckage in two, carrying Egeon in one direction and his wife in the other. Eventually, the Corinthian ship rescued Egeon and the one twin whom he was with, but they were unable to catch up to the Epidaurian ship, which had picked up his wife and his other son and carried them away.
When the son who remained with him had grown up, Egeon relates, the young man took his slave and set off into the world to find his brother and mother. Egeon himself followed suit, and his wanderings eventually led him to Ephesus, where he was willing to brave arrest and execution in the hopes of finding the missing half of his family.
The Duke, hearing this story, is deeply moved, and although he cannot violate his city's laws, he offers Egeon a day of liberty to find someone to ransom his life. Egeon's despair does not lift, however, since the task seems hopeless. Nevertheless, he sets about canvassing the city, searching for assistance.
These opening speeches, first by the Duke and then by Egeon, serve to locate the play both in a specific time and place and in relation to past events. The time and place is ancient Greece, with its rival city-states of Ephesus, Syracuse, Corinth, and Epidamnum; but it is an Elizabethan version of the Greek world, in which Christian references abound and English debt-officers co-exist with ancient practices of slavery. In other words, it is one of Shakespeare's imagined places, like the pre-Christian England of King Lear and Cymbeline.
More important than the setting, from the audience's perspective, is the background information: the conflict between Syracuse and Ephesus that threatens Egeon's life and Egeon's tragic and fantastic family history. The story of the two pairs of twins, who the audience will quickly identify as the Antipholi and Dromios, grants the viewers information that is unavailable to the characters, who grope ignorantly through the mists of mistaken identity that fill the play. We laugh, knowing that there are two masters and two slaves and, thus, understanding how the various mix-ups come to be. But for the unfortunate participants in the farce, there is only confusion at what seem to be supernatural events.
This contrast between the audience, who know they are watching a comedy, and the characters, who have no such privileged information, hints at a deeper understanding of the nature of comedy. While The Comedy of Errors is clearly a slapstick affair, in which nearly every scene is played for laughs, the grim opening and later confusion reminds us of the threat of tragedy that often hangs over Shakespeare's comic plays. Certainly, as Egeon catalogues the fantastic woes that have befallen him, he does not see himself as a player in a farce. The threat of his impending execution provides the play with a dark undercurrent to the comic scenes that follow. But while a tragedy moves from order into disorder, from life into death, a comedy reverses the order. So, the play begins with Egeon's grim statement, "proceed, Solinus, to procure my fall, / And by the doom of death end woes and all(I.i.1-2)," but moves toward an ending in which the forces of disorder and destruction are overcome by the forces of reconciliation and renewal.