The introductory essay to the novel tells of the author’s hometown - Salem, about his ancestors - Puritan fanatics, about his work in Salem customs and about the people he had to face there. “Neither the front door nor the back door of customs leads to paradise,” and the service in this institution does not contribute to the flowering of good inclinations in people. Once, digging through papers heaped in a huge room on the third floor of customs, the author found a manuscript of a certain Jonathan Pugh, who had died eighty years ago. It was a biography of Esther Prien, who lived at the end of the 17th century. A red rag was kept with the papers, upon closer inspection it turned out to be amazingly embroidered with the letter “A”; when the author put it to his chest, it seemed to him that he felt a burn. Dismissed after the Whig victory, the author returned to literary studies, for which the fruits of the work of Mr. Pugh were very useful to him.
From Boston prison comes Esther Prien with a baby in her arms. She is wearing a beautiful dress that she sewed for herself in prison, on his chest his scarlet embroidery in the form of the letter “A” - the first letter of the word Adulteress (adulteress). Everyone condemns Esther's behavior and her defiant outfit. She is led to the market square to the platform, where she will have to stand up to one in the afternoon under the hostile looks of the crowd - such a punishment was brought to her by the court for her sin and for refusing to give the name of the father to her newborn daughter. Standing at the pillory, Esther recalls her past life, childhood in old England, a middle-aged hunched scientist with whom she linked her fate. Looking around the crowd, she notices in the back rows a man who immediately takes possession of her thoughts. This man is not young, he has the penetrating gaze of a researcher and the hunched back of a tireless worker. He asks others about who she is. They are surprised that he did not hear anything about her. But he explains that he is not here, has long been enslaved to the Gentiles, and now the Indian brought him to Boston to receive a ransom. He is told that Esther Prien is the wife of an English scientist who decided to move to New England. He sent his wife forward, and he lingered in Europe. During her two years in Boston, Esther did not receive any news from him: he probably died. The condescending court took into account all extenuating circumstances and did not condemn the fallen woman to death, but sentenced him to just stand for three hours on the platform at the shameful pillar, and then carry the sign of dishonor on his chest for the rest of his life. But everyone is outraged that she did not name the accomplice of sin. The oldest Boston priest, John Wilson, convinces Esther to reveal the name of the seducer, followed by a young pastor, Dimsdale, whose parishioner she was, breaking her excitement. But the young woman is stubbornly silent, holding her baby tightly to her chest.
When Esther returns to prison, the same stranger whom she saw in the square comes to her. He is a doctor and calls himself Roger Chillingworth. First, he calms the child, then gives the medicine Esther. She is afraid that he will poison her, but the doctor promises not to revenge either the young woman or the baby. It was too presumptuous of him to marry a young beautiful girl and wait for a reciprocal feeling from her. Esther was always honest with him and did not pretend that she loved him. So both of them have done harm to each other and even. But Chillingworth wants to know the name of his beloved Esther, the name of the person who has done evil to both of them. Esther refuses to name him. Chillingworth makes her swear that she will not reveal to anyone his real name and her relationship with him. Let everyone believe that her husband is dead. He decides, by all means, to find out who Esther sinned with and revenge her lover.
After leaving prison, Esther settles in an abandoned house on the outskirts of Boston and makes a living as a needlework. She is such a skilled embroiderer that she has no end to customers. She buys herself only the necessities, and distributes the rest of the money to the poor, often hearing insults instead of gratitude in return. Her daughter Pearl is beautiful, but has a passionate and changeable disposition, so Esther is not easy with her. Pearl does not want to obey any rules. Her first conscious impression was the scarlet letter on Esther's chest.
The seal of rejection lies with the girl: she is not like other children, does not play with them. Seeing the girl’s oddities and desperate to find out who her father is, some citizens consider her a devilish spawn. Esther never breaks up with her daughter and takes her with her everywhere. One day they come to the governor to give back a pair of ceremonial embroidered gloves ordered by him. The governor is not at home, and they are waiting for him in the garden. The governor returns with the priests Wilson and Dimsdale. On the way, they talked about Pearl being a child of sin and should take it from her mother and transfer it to other hands. When they report this to Esther, she does not agree to give her daughter up. Pastor Wilson decides to find out if Esther is raising her in a Christian spirit. Pearl, who knows even more than what is supposed to be at her age, stubbornly and answers the question of who created her, replies that no one created her, her mother just found her in a rose bush at the door of the prison. Pious gentlemen are horrified: the girl is already three years old, and she does not know who created her. They decide to take Pearl from their mother, and she manages to keep her daughter at home only thanks to the intercession of Pastor Dimsdale.
The knowledge of medicine and piety have earned the respect of the people of Boston for Chillingworth. Soon after his arrival, he elected the Rev. Dimsdale as his spiritual father. All parishioners highly esteemed the young theologian and were concerned about his health, which has deteriorated sharply in recent years. People saw the finger of Providence on their arrival at their skilled doctor and insisted that Mr. Dimsdale turn to him for help. As a result, the young priest and the old doctor made friends, and then even settled together. Chillingworth, who set about investigating Esther's secrets with the stern impartiality of a judge, is increasingly falling under the power of one single feeling - revenge, which subjugates his whole life. Feeling the ardent nature of the young priest, he wants to penetrate into the hidden depths of his soul and for this does not stop at nothing. Chillingworth provokes Dimsdale all the time, telling him about unrepentant sinners. He claims that Dimsdale’s bodily ailment is based on a mental wound and persuades the priest to reveal to him, the doctor, the cause of his emotional Suffering. Dimsdale exclaims: "Who are you to <...> stand between the sufferer and his Lord?" But once a young priest falls asleep in a chair during the day and does not wake up even when Chillingworth enters the room. The old man approaches him, puts his hand on his chest and unfastens clothes that Dimsdale never took off in the presence of a doctor. Chillingworth triumphs - "this is how Satan behaves when he is convinced that a precious human soul is lost for heaven and won for hell." Dimsdale feels hostility towards Chillingworth and reproaches himself for her, finding no reason for her, and Chillingworth - "a miserable, lonely creature, even more miserable than his victim" - is trying with all his might to aggravate Dimsdale's mental torment.
One night, Dimsdale walks to the market square and stands at the pillory. At dawn pass by Esther Prien and Pearl. The priest calls to them, they ascend to the platform and stand next to him. Pearl asks Dimsdale if he will stand here with them tomorrow afternoon, but he replies that on the Day of the Last Judgment they will all three stand before the throne of the great judge, but now is not the time and daylight should not see them three. The dark sky suddenly lights up - probably this is the light of a meteor. They see not far from the platform of Chillingworth, who is inseparably looking at them. Dimsdale tells Esther that he feels inexpressible horror at this man, but Esther, bound by an oath, does not reveal to him the secrets of Chillingworth.
Years go by. Pearl is seven years old. The perfect behavior of Esther and her disinterested help to the afflicted leads to the fact that the inhabitants of the town begin to treat her with a kind of respect. Even the scarlet letter seems to them not a symbol of sin, but of inner strength. Once, while walking with Pearl, Esther meets Chillingworth and is amazed at the change that has occurred in him in recent years. The calm, wise face of the scientist acquired a predatory, cruel expression, a smile looks on him with a grimace. Esther speaks to him, this is their first conversation since the time when he took an oath from her not to reveal his real name. Esther asks him not to torture Dimsdale: the suffering that Chillingworth puts him under is worse than death. In addition, he is tormented by the eyes of his sworn enemy, not even knowing who he is. Esther asks why Chillingworth is not taking revenge on her; he replies that a scarlet letter avenged him. Esther begs Chillingworth to change his mind, he can still be saved, because this hatred has turned him from a wise, just person to the devil. It is in his power to forgive, forgiveness of people who have offended him will be his salvation. But Chillingworth cannot forgive; his destiny is hatred and revenge.
Esther decides to reveal to Dimsdale that Chillingworth is her husband. She is looking for a meeting with the priest. Finally she meets him in the forest. Dimsdale tells her how he suffers from the fact that everyone considers him pure and immaculate, while he has stained himself with sin. He is surrounded by lies, emptiness, death. Esther reveals to him who is hiding under the name of Chillingworth. Dimsdale is enraged: through the fault of Esther, he "laid bare his feeble criminal soul before the gaze of the one who secretly mocked her." But he forgives Esther. Both of them believe that the sin of Chillingworth is even worse than their sin: he encroached on the shrine of the human heart. They understand - Chillingworth, knowing that Esther is going to reveal Dimsdale his secret, invents new intrigues. Esther offers Dimsdale to run and start a new life. She agrees with the skipper of the ship sailing to Bristol that he will take on board two adults and a child.
The ship is due to sail in three days, and on the eve of Dimsdale is about to read a sermon on election day. But he feels his mind clouding. Chillingworth offers him his help, but Dimsdale refuses. People gather in the market square to hear Dimsdale's message. Esther meets a skipper of a Bristol vessel in the crowd, and he informs her that Chillingworth will also sail with them. She sees on the other side of Chillingworth Square who smiles ominously at her. Dimsdale delivers a brilliant sermon. The festive procession begins, Dimsdale decides to repent to the people. Chillingworth, realizing that this will ease the torment of the sufferer, and feeling that the victim is slipping away from him, rushes to him, begging him not to bring shame on his holy dignity. Dimsdale asks Esther to help him climb the platform. He stands at the pillory and repents of his sin before the people. In conclusion, he rips off the priestly scarf, exposing his chest. His gaze fades, he dies, his last words - praise to the Almighty. Different rumors are creeping around the city: some say that there was a scarlet letter on the priest’s chest - an exact similarity to the one worn by Esther Prien. Others, on the contrary, claim that the priest’s chest was clean, but, sensing the approach of death, he wished to give up the spirit in the arms of a fallen woman in order to show the world how doubtful the righteousness of the most immaculate of people is.
After the death of Dimsdale, Chillingworth, who had lost the meaning of life, immediately became decrepit, and his spiritual and physical strength left him at once. Not even a year had passed before he died. He bequeathed his entire great fortune to little Pearl. After the death of the old doctor, Esther and her daughter disappeared, and the story of Esther became a legend. Many years later, Esther returned and again voluntarily put on the emblem of shame. She lives alone in her old house on the outskirts of Boston. Pearl, apparently, happily married, remembered her mother, wrote to her, sent gifts and would be glad if Esther lived with her. But Esther wanted to live where her sin had happened - she believed that atonement should also be done there. When she died, she was buried next to Pastor Dimsdale, but a gap was left between the two graves, as if even after death the ashes of these two had no right to mingle.