The Scarlet Letter takes place from 1642 to 1649 in Boston, Massachusetts. (The colonial dates have been established by scholars studying the work; they are not stated explicitly by Hawthorne.) At that time Boston was part of the Massachusetts Bay Colony, a settlement controlled by the Puritans, a Protestant group. Far less tolerant than later Protestant leaders in Connecticut and Rhode Island, the Puritans established a repressive theocracy. Any sin against God's will (as that will is expressed in the Bible) was considered a crime against society. The crime of adultery was punishable by death because it violated the seventh commandment.
The first part of the novel, "The Custom-House," is set in 1850 in Salem, Massachusetts. A 30-page introduction to the romance, this section merges an autobiographical account of Hawthorne's ordeal as a customs inspector with the fiction of his finding a faded scrap of cloth in the shape of an A accompanied by a manuscript describing the origin of the fragment.
The first chapter, "The Prison-Door," establishes the time, 1642, and the setting, Boston, for the rest of the novel. It opens with a crowd of people in "sad-colored garments and gray, steeple-crowned hats" gathered around the city's grim prison. They await the emergence of Hester Prynne, a beautiful young woman who had arrived from England, ahead of her husband, a "misshapen scholar" devoted to the investigation of the human soul. In the opening scene, Hester emerges from the prison with a baby in her arms. She has been convicted of adultery: her punishment, thought too easy by some, includes a few months of incarceration followed by a public shaming on the scaffold at the "western extremity of the market-place ... nearly beneath the eaves of Boston's oldest church." Stitched to the bodice of her dress is an elaborately embroidered A. Although Hester has been sentenced to wear the scarlet letter as a constant and public reminder of her sin, all marvel at her artistic needlework and the lively design wrought in gold thread that seems to mock the austere habits of dress among the Puritans.
Hester appears on the scaffold with her infant daughter Pearl—proof of her illicit affair—clutched to her breast. Many of the onlookers, put off by her flaunted beauty and dignity, demand to know the identity of her lover. She refuses, her misery heightened when she recognizes among the crowd her long-lost husband. She also suffers at that moment the demands of her minister, Arthur Dimmesdale, who begs her to reveal the name of her "fellow-sinner and fellow-sufferer." Hester refuses and returns to prison.
Her husband joins her there. A doctor, he provides medicine to calm both Hester and the baby, who is hysterical. Hester's husband has taken the name Roger Chillingworth to hide his identity so he can discover who her lover is and thus get his revenge. He extracts a promise from Hester not to expose him, a promise she makes but fears she will regret.
Released from prison, Hester supports herself and Pearl by making and selling beautiful needlework. Although she is free to go anywhere, Hester settles in a small home on the outskirts of town. Pearl is very disobedient, even wild. After a few years, Pearl's refusal to obey the strict Puritan rules becomes widely known and the authorities decide to remove the child from Hester's care. Hester begs Governor Bellingham not to take away her child. When Dimmesdale speaks up, Hester is allowed to keep her daughter.
Chillingworth, on his vengeful quest, moves in with Dimmesdale, claiming to help the minister recover his health. In reality Chillingworth is subtly torturing Dimmesdale, whom he suspects to have been Hester's lover.
One evening Hester, Pearl, and Dimmesdale meet on the scaffold where Hester had stood seven years before. Dimmesdale admits his guilt in not acknowledging his role in the affair, but he lacks courage to admit his guilt freely to the entire town. Hester is now beloved by the community for unselfishly helping everyone. The once despised A, a sign of sin, has come to be a welcome sight. Some say it now stands for able. Hester has become drab and plain; Dimmesdale has become shockingly frail and thin. Worried about Dimmesdale's decline, Hester convinces Chillingworth to release her from her promise to hide his identity. She, Dimmesdale, and Pearl meet in the forest. Hester tells Dimmesdale who Chillingworth really is, and they make plans to secretly leave for England.
Three days later on Election Day, Dimmesdale gives the greatest speech of his life. The people celebrate his saintliness, not realizing he is a sinner. To everyone's shock, he climbs on the scaffold and confesses his sin to the entire community. He rips off his shirt, baring his chest, and then dies in Hester's arms. In the final chapter, the narrator speculates on what Dimmesdale revealed on his chest: was it an A? Was there nothing at all? Chillingworth, having lost his reason for living, dies within months. He leaves all his money to Pearl, making her the richest heiress in the New World. Hester leaves Boston but then returns, remaining in her small house for the rest of her life. She is buried close to Dimmesdale, sharing with him a headstone carved with an A."