Time Magazine included the novel in its TIME 100 Best English-language Novels from 1923 to 2005.
The book's title appears about halfway through the novel in the following passage:
Scobie is passed over yet again for a promotion to Commissioner, causing Louise great distress, both for her personal ambition and her hopes that the local British community will begin to accept her. Louise asks Scobie to send her away to South Africa, and then to join her there in a few years when he can retire.
At the same time, a new inspector, named Wilson, arrives in the town. He is priggish and socially inept, and hides his passion for poetry for fear of ostracism from his colleagues. He and Louise strike up a friendship, which Wilson mistakes for love. Wilson rooms with another colleague named Harris, who has created a sport for himself of killing the cockroaches that appear in the apartment each night. He invites Wilson to join him, but in the first match, they end up quarreling over the rules of engagement.
One of Scobie's duties is to lead the inspections of local passenger ships, particularly looking for smuggled diamonds, a needle-in-a-haystack problem that never yields results. A Portuguese ship, the Esperança (the Portuguese word for "hope"), comes into port, and a disgruntled steward reveals the location of a letter hidden in the captain’s quarters. Scobie finds it, and because it is addressed to someone in Germany, he must confiscate it in case it should contain secret codes or other clandestine information. The captain says it’s a letter to his daughter and begs Scobie to forget the incident, offering him a bribe of one hundred pounds when he learns that they share a faith. Scobie declines the bribe and takes the letter, but having opened and read it through (thus breaking the rules) and finding it innocuous, he decides not to submit it to the authorities, and burns it.
Scobie is called to a small inland town to deal with the suicide of the local inspector, a man named Pemberton, who was in his early twenties and left a note implying that his suicide was due to a loan he couldn’t repay. Scobie suspects the involvement of the local agent of a Syrian man named Yusef, a local black marketeer. Yusef denies it, but warns Scobie that the British have sent a new inspector specifically to look for diamonds; Scobie claims this is a hoax and that he doesn't know of any such man. Scobie later dreams that he is in Pemberton's situation, even writing a similar note, but when he awakens, he tells himself that he could never commit suicide, as no cause is worth the eternal damnation that suicide would bring.
Scobie tries to secure a loan from the bank to pay the two hundred pound fee for Louise’s passage, but is turned down. Yusef offers to lend Scobie the money at four percent per annum. Scobie initially declines, but after an incident where he mistakenly thinks Louise is contemplating suicide, he accepts the loan and sends Louise to South Africa. Wilson meets them at the pier and tries to interfere with their parting.
Shortly afterwards, the survivors of a shipwreck begin to arrive after forty days at sea in lifeboats. One young girl dies as Scobie tries to comfort her by pretending to be the girl’s father, who was killed in the wreck. A nineteen-year-old woman named Helen Rolt also arrives in bad shape, clutching an album of postage stamps. She was married before the ship left its original port and is now a widow, and her wedding ring is too big for her finger. Scobie feels drawn to her, as much to the cherished album of stamps as to her physical presence.
He soon starts a passionate affair with her, all the time being aware that he is committing a grave sin of adultery. A letter he writes to Helen ends up in Yusef's hands, and the Syrian uses it to blackmail Scobie into sending a letter for him via the returning Esperança, thus avoiding the censors.
When Louise unexpectedly returns, Scobie struggles to keep her ignorant of his love affair. But he is unable to renounce Helen, even in the confessional, so the priest tells him to think it over again and postpones absolution. Still, in order to please his wife, Scobie goes to Mass with her and thus receives communion in state of "mortal sin"—one of the gravest sins for a Catholic to commit.
Shortly after he witnesses Yusef's boy delivering a 'gift' to Scobie, Scobie's servant Ali is killed by wharf rats. We are led to believe that Yusef arranged this, although Scobie blames himself. In the body of his dead servant, Scobie sees the image of God.
Now desperate, he decides to free everyone from himself—even God—so he commits suicide, being aware that this will result in damnation according to the teaching of the Church. But his efforts prove useless in the end. Louise had been not as naive as he had believed, the affair with Helen and the suicide are found out, and his wife is left behind wondering about the mercy and forgiveness of God.
As Graham Greene himself saw it, The Heart of the Matter deals with the issue of pride. He illustrates this theme by describing Scobie, the main character of the book, as "a weak man with good intentions doomed by pride". He further says in the preface, "I had meant the story of Scobie to enlarge a theme which I had touched on in The Ministry of Fear, the disastrous effect on human beings of pity as distinct from compassion. I had written in The Ministry of Fear: 'Pity is cruel. Pity destroys. Love isn't safe when pity's prowling around.' The character of Scobie was intended to show that pity can be the expression of an almost monstrous pride.
In the introduction he goes on to say that the piece can be seen as a kind of exploration of his experiences in Sierra Leone as an operative for MI6 during World War II, drawing from his experiences almost directly for the work (such as the smuggled Portuguese letter found on a ship, which he did not allow to pass as in the book, but instead radioed up London asking "What was it all for?" to which he never received a response). In the preface of the novel he notes that the story originally came from a desire on his part to write a detective story where the principal character, the villain, is ignorant of who the detective is.
Whatever Greene's writings and personal feelings toward the story (he hated it and idly suggests that an earlier, failed piece whose place was given to The Heart of the Matter may well have been a better work), the themes of failure are threaded strongly throughout. Each character in the novel, be it Scobie or Wilson, fails in their ultimate goals by the end of the book. Scobie's ultimate sacrifice, suicide, fails to bring the expected happiness he imagines it will to his wife and despite the fact that he tries to conceal the secret of his infidelity with that ultimate sin, the reader discovers that his wife had known all along.
Similarly, Wilson, the man who is pursuing an adulterous affair with Scobie's wife, an affair she refuses to participate in, is foiled at the end of the novel when Scobie's wife refuses to give in to his advances even after Scobie's death. Other instances of failure, both subtler and more obvious, can be seen throughout the work, lending it a muted, dark feeling.
The Heart of the Matter is not just about failure, but about the price we all pay for our individualism and the impossibility of truly understanding another person. Each of the characters in the novel operates at tangential purposes which they often think are clear to others, or think are hidden from others, but are in fact not. This is illustrated wonderfully by Scobie's attempt to hide his affair from his wife, thinking that being a policeman should give him the edge, but whose failure is evident in the following passage;
"'Did you know all the time - about her?' Wilson asked.
'It's why I came home. Mrs. Carter wrote to me. She said everybody was talking. Of course he (Scobie) never realized that. He thought he'd been so clever. And he nearly convinced me—that it was finished. Going to communion the way he did.'
As in many of Greene's earlier works this books deals with not just the tension of the individual and the state, but also the conflict of the individual and the church. Scobie throughout the book constantly puts his fears in the voice and context of religion. After his wife returns he has a pathological fear of taking communion while suffering the stain of mortal sin and later agonizes over the choice of suicide in terms of its theological damnation. The conflict is particularly interesting because it is not a conflict of faith, but rather a dispute set in legalistic terms: whether a violation of the laws of faith is justified by the personal sense of duty the character feels; which duty, personal or theological, is in the end primary; and what happens when those laws are broken. This argument is not simply one of whether Scobie is damned to hell, a question Greene himself tired of, but rather of whether what he did was worth anything in the world of the present.