Esther learns of Harry's murder on the day it happens. She worries that her advice to Jem led him to murder Harry, so she goes to investigate the scene of the crime. She finds a wad of paper which the murderer must have used to silence his gun. She discovers that the paper has Mary's name and address written in Jem's handwriting. Esther first pawns her gaudy clothes for a respectable outfit and then goes to the Barton home. Upon seeing her niece, Esther pretends to be a mechanic’s wife on the other side of town, but Mary feels resentful towards her aunt for abandoning the family so many years ago. They discuss the murder and Esther gives Mary the piece of paper with her name on it. Mary begs Esther not to tell anyone about the paper and suddenly feels that her aunt must be kind after all for protecting her name. Esther gets ready to leave, and gives Mary a fake married name ('Fergusson') and address. When Mary attempts to kiss her aunt, Esther recoils and tells Mary never to kiss her. Esther runs out of the door, leaving Mary feeling bewildered.
Mary closes the shutters - she alone knows the truth, and this piece of paper proves that John Barton, not Jem, is Harry Carson's murderer. She goes upstairs, rifles through her father’s possessions and finds the rest of Jem’s valentine that she had used to copy the Samuel Bamford poem for her father. She realizes that Jem must know her father is the murderer because John must have borrowed Jem’s gun. Mary cannot fathom the reason for her father’s action because he knew nothing of Harry’s attentions. She does know, however, that Jem is innocent, and she now has to prove it without revealing her father’s guilt. Mary then burns the chit of paper, and realizes that Jem needs an alibi.
Mary asks Job Legh for legal advice. Margaret receives her friend coldly because she is disappointed in Mary for flirting with Harry in the first place. Mary brings up the question of Jem’s innocence, but both Margaret and Job think that he is guilty. Job is kind, though, and helps Mary by telling her that she needs to discover Jem’s whereabouts at the time of the murder to prove an alibi. Margaret remembers that Jem had mentioned keeping Will company on his walk to Liverpool. Mary goes to Jane Wilson’s house, where she learns that Jem will stand trial on Tuesday. Jane corroborates Margaret’s information that Jem was to accompany Will the night Harry Carson was murdered.
Mary returns home, thinking of how she will find Will to prove Jem's alibi. She remembers the name of Will's ship, the John Cropper, and is instantly energized. Then, there is a knock on the door and Mary's neighbor hands her a subpoena that a policeman has left for her. Mary takes the parchment to Job who explains that she must bear witness against Jem Wilson at the Assize court in Liverpool. Mary keeps insisting on Jem's innocence, but Job cannot accept this, because there is a mountain of evidence to the contrary. He promises to help anyway. Margaret still treats Mary coldly, despite Job’s insistence that Mary looks pale and hungry and could do with some dinner.
Mary explains her plan to Margaret and the emotion in Mary’s voice melts Margaret’s cool resolve. Margaret tells her friend that Will is staying with Mrs. Jones in Milk-House Yard, outside of Nicholas Street. Job promises to pray for Jem and leaves to fetch his lawyer friend, Mr. Cheshire. When the girls are alone, Mary tearfully begs Margaret to forgive her. Margaret does, but warns Mary not to hope too much for an acquittal. Margaret gives Mary money for her journey to Liverpool. Job returns after seeing another lawyer who knows a Mr. Bridgenorth, Esq., who will visit Jem in jail on Monday morning. He and Mary plan to travel to Liverpool together, find Will, and all meet at the lawyer’s office on Monday at two o’clock. They go over the details and separate.
Later, Mary goes to see Jane Wilson, who has also received a subpoena. She will have to testify in court that the gun belongs to her son. Mary and Mrs. Davenport manage to get Jane to bed, and Mary stays to watch Alice and Jane overnight. In the morning, Mary fetches the doctor because Jane is so distraught. The jolly doctor is willing to do whatever will please Mary - either forbid or allow Jane to journey to Liverpool. Mary does not want Jane to go, but Job thinks that if Jane stays behind, it will look suspicious. He then sends Mary home because she looks pale and tells her to wait for the lawyer’s advice.
Mary returns home, dizzy and anxious, and is immediately besieged by Sally Leadbitter, who offers Mary her fine black scarf. Sally covets the male attention she believes Mary will receive as witness to a murder trial. Sally departs when Job arrives. Job thinks that Sally is trouble but Mary just thinks the girl is jovial. Job accompanies Mary to see Jane Wilson and he agrees that she is too ill to travel to Liverpool, but Jane is insistent to see Jem for what may be the last time.
In Chapters XXI and XXII, Mary Barton veers into a different genre. It evolves from an expose of class-struggle into a murder mystery. Esther re-enters the Bartons' life by playing detective, finding the wadding paper with Mary’s name on it and bringing it to her niece’s home. The mystery feels like a departure from the writing style of the earlier chapters, perhaps because it is Gaskell's first attempt at writing a novel. Mary Barton is not easily classified and is generally a mélange of varied themes - but that is also what makes it such an unusual piece of work.
Even though Esther only turned to prostitution when she was at her most desperate, she will never escape classification as a fallen woman. Therefore, the disguise is necessary for Esther to venture into her old neighborhood and see Mary. It is true that Victorian society considered a woman who sold her body to be depraved, no matter what the circumstances - and considered her a pariah even if she were able to turn her life around.
Gaskell, more than most Victorian storytellers, casts a sympathetic light on Esther - the character understands an her own degradation and tries to save her niece from going down the same unfortunate path. However, the author does not question the social circumstances that might cause a woman to turn to such extreme means. As forward-thinking as Gaskell is in other aspects of her perspective, she still portrays prostitution as an unforgivable sin. She matter-of-factly describes Esther as "an abandoned and polluted outcast".
Margaret’s cold treatment of Mary is an example of the kind of treatment that fallen women could expect in Victorian England. Unfortunately for Mary, flirting with a young man is tantamount to losing one’s virtue all together - her innocent dalliance with Harry is only a few steps away from Esther's sojourn as a prostitute. Like Gaskell, Margaret is not easily understanding of Mary's choices. Even though her friend is suffering, Margaret takes the position of a moral judge - which is not what Mary needs. Margaret does not sympathize with Mary's desperation as an uneducated, motherless girl relying on her youth and beauty to improve her station in life. However, Mary’s repentance and determination to make things right win Margaret over - as is consistent with her kind character.
Mary’s avowal to prove Jem’s innocence brings her full circle - she is the heroine for the first time, earning her status as the novel's titular character. In these chapters, Mary starts to exert her will, instead of passively accepting everything that happens to her. It is her love for Jem that inspires Mary to take responsibility for the course of her life. Even though she is facing difficult circumstances - the man she loves is going to stand trial - Mary rises to the challenge, determined to get Jem acquitted without revealing the secret only she knows - that John is guilty of killing Harry Crane. This is a marked change from when Carson's mill burned down - when Mary fainted simply by witnessing the chaos.
Mary and Job's plan to go to Liverpool to find Will stretches the boundaries of believability. It is also doubtful an alibi confirmed only by Will, a close family member, would be strong enough to dispel Jem’s supposed guilt, especially considering the amount of evidence to the contrary. However, juries in Victorian England were often reluctant to convict a criminal upon circumstantial evidence. Gaskell did research while she was writing Mary Barton, but in this particular narrative thread, it is clear that she is much more familiar with social work than with the criminal justice system.