One New Year's Eve, Trotty, a poor elderly "ticket-porter" or casual messenger, is filled with gloom at the reports of crime and immorality in the newspapers, and wonders whether the working classes are simply wicked by nature. His daughter Meg and her long-time fianc  Richard arrive and announce their decision to marry next day. Trotty hides his misgivings, but their happiness is dispelled by an encounter with the pompous Alderman Cute, plus a political economist and a young gentleman with a nostalgia, all of whom make Trotty, Meg and Richard feel they hardly have a right to exist, let alone marry.
Trotty carries a note for Cute to Sir Joseph Bowley MP, who dispenses charity to the poor in the manner of a paternal dictator. Bowley is ostentatiously settling his debts to ensure a clean start to the new year, and berates Trotty because he owes a few shillings to his local shop which he cannot pay off. Returning home, convinced that he and his fellow poor are naturally ungrateful and have no place in society, Trotty encounters Will Fern, a poor countryman, and his orphaned niece, Lilian. Fern has been accused of vagrancy and wants to visit Cute to set matters straight, but from a conversation overheard at Bowley's house, Trotty is able to warn him that Cute plans to have him arrested and imprisoned. He takes the pair home with him and he and Meg share their meagre food and poor lodging with the visitors. Meg tries to hide her distress, but it seems she has been dissuaded from marrying Richard by her encounter with Cute and the others.
In the night, the bells seem to call Trotty. Going to the church, he finds the tower door unlocked and climbs to the bellchamber, where he discovers the spirits of the bells and their goblin attendants who reprimand him for losing faith in man's destiny to improve. He is told that he fell from the tower during his climb and is now dead, and Meg's subsequent life must now be an object lesson for him. There follows a series of visions which he is forced to watch, helpless to interfere with the troubled lives of Meg, Richard, Will and Lilian over the subsequent years. Richard descends into alcoholism; Meg eventually marries him in an effort to save him, but he dies ruined, leaving her with a baby. Will is driven in and out of prison by petty laws and restrictions; Lilian turns to prostitution. In the end, destitute, Meg is driven to contemplate drowning herself and her child, thus committing the mortal sins of murder and suicide. The chimes' intention is to teach Trotty that, far from being naturally wicked, mankind is formed to strive for nobler things, and will fall only when crushed and repressed beyond bearing. Trotty breaks down when he sees Meg poised to jump into the river, cries that he has learned his lesson and begs the Chimes to save her, whereupon he finds himself able to touch her and prevent her from jumping.
At the end of the book, Trotty finds himself awakening at home as if from a dream as the bells ring in the New Year of the day Trotty originally climbed the tower. Meg and Richard have chosen to wed, and all of her friends have spontaneously chosen to provide a wedding feast and celebration. The author explicitly invites the reader to decide if this "awakening" is a dream-within-a-dream. The reader must choose between the harsh consequences of the behavior of the upper classes in Trotty's vision, or the happiness of the wedding.
Output: What caused Trotty to decide to go to the church in the night?