Old John Pontifex, the great-grandfather of the central character, Ernest, is a gentle, artistically gifted, and unpretentious carpenter in the village of Paleham. Unfortunately, his one and only child, George, reflects the characteristics of his obstinate and humorless mother. Following an apprenticeship, George assumes control of his uncle's London publishing house, which caters to the pious tastes of the middle-class reading public. Although outwardly a respectable businessman, George is a domestic tyrant, particularly to his youngest son, Theobald. Weak-willed and unable to execute his vague aspirations to become a seafaring man, Theobald easily capitulates to his father's insistence that he enter the Anglican ministry.
Shortly after taking orders, Theobald meets Christina Allaby, one of five unmarried daughters in the family of the rector whom Theobald serves as curate. After winning matrimonial rights to Theobald from her sisters in a game of cards, Christina, tacitly in league with her mother, induces Theobald to propose marriage. Following a prolonged engagement, during which Theobald realizes he holds no genuine affection for Christina, he again goes against his better judgment by honoring his commitment. George's opposition to his son's financially unprofitable match leads Theobald to rationalize that his entering into a loveless marriage is a noble act.
Unlike his father in almost every other way, Theobald is very like him as an authoritarian. He is determined to seek out and destroy the least sign of individuality in any of his children, and it is the oldest child, Ernest, who is made to suffer the frontal wave of his assault. Ernest is beaten for mispronouncing words, denied pocket money, and given "pleasure" by being allowed to select his own hymn to sing at Sunday evening service. Although his mother is far better natured and gentler than Theobald, she eventually alienates Ernest by betraying his confidences to Theobald, who promptly administers punishment to his son. Neither Ernest's younger brother nor sister is the kind of playmate who can alleviate the harsh domestic regime, for they invariably submit to their parents' demands. Only the household servants provide Ernest with pleasurable companionship.
At age twelve, Ernest enters Roughborough School, whose headmaster, Dr. Skinner, treats his charges much the same way that Theobald treats his children. Ernest is apathetic in his studies, dislikes athletics, begins to smoke and drink, but is not unpopular with his schoolmates. When Ernest's Aunt Alethea moves to Roughborough, she provides Ernest relief from his depressing existence by arranging lessons in carpentry for him and brightening his drab life with her cheerful company. Unfortunately, she is suddenly stricken with typhoid fever and dies; she arranges her will, however, so that Ernest will receive most of her sizable estate on his twenty-eighth birthday.
Another misfortune befalls Ernest when he is home during a long vacation. Ellen, a friendly and charming servant girl at Battersby, is dismissed from service by Theobald when she is discovered to be pregnant. Christina half hopes that Ernest is the father, but he is innocent; he is guilty, however, of having given Ellen all his personal possessions of any value to help her on her way. When Theobald discovers Ernest's act, he forces a confession from Ernest and then extorts knowledge from him of his and the other schoolboys' vices at Roughborough. Ernest is agonized at having to tell tales out of school, and after he returns to Roughborough, he is severely punished by Dr. Skinner. The other boys readily forgive him, however, when he voluntarily admits his perfidy, and they gain revenge on Theobald by burning him in effigy on Guy Fawke's day, ironically the day of Ernest's confirmation.
After completing his studies at Roughborough, Ernest enters Emmanual College of Cambridge University; there he enjoys a new freedom, gains at least a modest reputation as an intellectual, and takes an honors degree. Unfortunately, after showing flashes of distinctive literary gifts and a sense of humor, Ernest falls under the influence of the Simeonites, a small group of evangelistically fervent students. When he writes to his parents of his religious ardor, they are more frightened than amused; Theobald nonetheless insists that his son take religious orders, and Ernest complies.
Ernest requests and subsequently receives an appointment as a junior curate in a London parish which is populated by the lower classes who are, for the most part, indifferent to religion. Under the spell of a slightly older curate, Pryer, Ernest hopes to found a College of Spiritual Pathology to treat disorders of the soul in much the same manner as physicians treat ailments of the body. Unfortunately, Ernest entrusts a small inheritance to Pryer for speculation in the stock market — the intended profits of this venture will enable them to advance God's work in the world more quickly. Unable to contain his enthusiasm, however, Ernest begins a private evangelical campaign of his own within the confines of his Ashpit Place boarding house. He is rebuffed at every clumsy attempt to gain converts; the culmination of his efforts is a complete fiasco, for he mistakes a decent young woman for a prostitute, approaches her boldly, and promptly finds himself put under arrest for attempted assault.
In spite of the efforts of his godfather, Edward Overton, and a college acquaintance, Towneley, Ernest is sentenced to serve six months at hard labor in Coldbath Fields Prison. Upon reaching prison, Ernest suffers an attack of brain fever and remains bedfast for two months. Once he is sufficiently recovered, Ernest is apprenticed to the prison tailor and is given the post of chapel organist. He learns of Pryer's absconding with his inheritance and his father's renunciation of him at the same time. The prison chaplain gives him practical advice and makes no attempt to dissuade Ernest from leaving the ministry. By the time his sentence is completed, Ernest has not only renounced Christianity but his parents as well, telling them to think of him as one who is dead.
With the help of Overton, Ernest reenters the world but is unsuccessful in his attempts to gain employment as a tailor. A chance meeting with Ellen, the servant discharged by Theobald when Ernest was yet at Roughborough, gives him the idea of opening a used-clothing shop, a line of work in which Ellen is experienced. Ernest quickly becomes infatuated with Ellen, who is extremely attractive despite having led a dissolute life in London. Overton is upset by Ernest's determination to marry her but advances the young couple money for the leasing of a shop which also provides living quarters.
Both the marriage and the business prosper at first, but when Ellen tires of her role as the wife of a well-educated and refined husband, she begins to drink heavily, a practice which she artfully conceals from Ernest. He attributes her strange behavior to being with child, and only after she lapses into drinking a second time, when carrying her second child, does the naive Ernest understand the true cause of her distress. Resigned to a burdensome marriage and almost certain penury, Ernest suddenly gains relief upon hearing the testimony of her father's former coachman who left Battersby at the time of Ellen's dismissal. The testimony, to the effect that the coachman and Ellen had earlier married, prompts Ernest to arrange a separation from his supposed wife and to place his children first in the care of Overton's laundress and later in a foster home.
With less than two years remaining before Ernest is to receive his Aunt Alethea's legacy, now grown to a considerable fortune, Overton decides that his godson has suffered enough and employs him as his secretary. Ernest's main duty is to manage the sums of money which, unknown to him, are soon to be his own. Ernest's shock and surprise when he comes into his fortune is matched only by that of Theobald. Called to his dying mother's bedside, Ernest does not flaunt his wealth; he acts firmly with his father and gently indulges his mother's concerns for her soul-worthiness. The reconciliation with his parents rounds out Ernest's prolonged and harassing process of maturation. Financially able to do as he pleases, Ernest first goes abroad for a number of years and then returns to set himself up as an intellectual gadfly, determined to attack the shams of a society which, willing or not, needs his corrective treatment.