Moll's mother is a convict in Newgate Prison in London who is given a reprieve by "pleading her belly," a reference to the custom of staying the executions of pregnant criminals. Her mother is eventually transported to America, and Moll Flanders (not her birth name, she emphasises, taking care not to reveal it) is raised until adolescence by a goodly foster mother. Thereafter she gets attached to a household as a servant where she is loved by both sons, the elder of whom convinces her to "act like they were married" in bed. Unwilling to marry her, he persuades her to marry his younger brother. After five years of marriage, she then is widowed, leaves her children in the care of in-laws, and begins honing the skill of passing herself off as a fortuned widow to attract a man who will marry her and provide her with security.
The first time she does this, her "gentleman-tradesman" spendthrift husband goes bankrupt and flees to the Continent, leaving her on her own with his blessing to do the best she can to forget him. (They had one child together, but he died.) The second time, she makes a match that leads her to Virginia with a kindly man who introduces her to his mother. After three children (one dies), Moll learns that her mother-in-law is actually her biological mother, which makes her husband her half-brother. She dissolves their marriage and after continuing to live with her brother for three years, travels back to England, leaving her two children behind, and goes to live in Bath to seek a new husband.
Again she returns to her con skills and develops a relationship with a man in Bath whose wife is elsewhere confined due to insanity. Their relationship is at first platonic, but eventually develops into Moll becoming something of a "kept woman" in Hammersmith, London. They have three children (one lives), but after a severe illness he repents, breaks off the arrangement, and commits to his wife.
Moll, now 42, resorts to another beau, a banker Callum Murray, who while still married to an adulterous wife (a "whore"), proposes to Moll after she entrusts him with her herd of cattle. While waiting for Callum to divorce, Moll pretends to have a great fortune to attract another wealthy husband Samuel. She becomes involved with some Roman Catholics in Lancashire that try to convert her, and she marries one of them, a supposedly rich man Bretton. She soon realises he expected to receive a great herd of cattle which she denies having, leading him to admit that he has cheated her into marriage, having himself lied about having money that he does not possess. He is in fact a ruined gentleman and discharges her from the marriage, telling her nevertheless that she should inherit any money he might ever get (finally, she mentions his name). Although now pregnant again, Moll lets the banker believe she is available, hoping he returns. She gives birth and the midwife gives a tripartite scale of the costs of bearing a child, with one value level per social class.
Moll's son is born when the banker's wife commits suicide following their divorce, and Moll leaves her newborn in the care of a countrywoman in exchange for the sum of  5 a year. Moll marries the banker now, but realises "what an abominable creature I am! and how this innocent gentleman is going to be abused by me!" They live in happiness for five years before he becomes bankrupt and dies of despair, the fate of their two children left unstated.
Truly desperate now, Moll begins a career of artful thievery, which, by employing her wits, beauty, charm, and femininity, as well as hard-heartedness and wickedness, brings her the financial security she has always sought. She assumes the name Moll Flanders and is known thereby. She is helped throughout her career as a thief by her Governess, who also acts as receiver. During this time she briefly becomes the mistress of a man she robbed, and is finally caught by two maids whilst trying to steal from a house.
In Newgate she is led to her repentance. At the same time, she reunites with her soulmate, her "Lancashire husband", who is also jailed for his robberies (before and after they first met, he acknowledges). Moll is found guilty of felony, but not burglary, the second charge; still, the sentence is death in any case. Yet Moll convinces a minister of her repentance, and together with her Lancashire husband is sent to the Colonies to avoid hanging, where they live happily together (she even talks the ship's captain into not being with the convicts sold upon arrival, but instead in the captain's quarters). Once in the colonies, Moll learns her mother has left her a plantation and that her own son (by her brother) is alive, as is her brother/husband.
Moll carefully introduces herself to her brother and their son, in disguise. With the help of a Quaker, the two found a farm with 50 servants in Maryland. Moll reveals herself now to her son in Virginia and he gives her her mother's inheritance, a farm for which he will now be her steward, providing  100 a year income for her. In turn, she makes him her heir and gives him a (stolen) gold watch.
At last, her life of conniving and desperation seems to be over. When her brother/husband is dead, Moll tells her (Lancashire) husband the entire story and he is "perfectly easy on that account... For, said he, it was no fault of yours, nor of his; it was a mistake impossible to be prevented". Aged 69 (in 1683), the two return to England to live "in sincere penitence for the wicked lives we have lived".
Output: What does Moll realize about her 3rd husband?