The Nice and the Good takes place in London and Dorset, England. Octavian Gray is a senior civil servant heading a government department in Whitehall. His seaside property, Trescombe House, is home to Octavian and his wife Kate and their 14-year-old daughter Barbara, as well as to the widowed Mary Clothier and her 15-year-old son Pierce, and the divorced Paula Biranne and her nine-year old twins Henrietta and Edward. Also in residence are Octavian's older brother Theo, and Willy Kost, a classical scholar and Dachau concentration camp survivor who lives in a cottage on the property.
John Ducane, the legal advisor to Octavian's government department, is a frequent visitor to Trescombe House. He is attempting to break off his relationship with Jessica, a young art teacher with whom he has had an affair in London, and who still loves him. He is anxious to end his relationship with Jessica so that he can commit himself fully to a Platonic relationship with Octavian's wife Kate.
The story begins in London with the suicide of Joseph Radeechy, a member of Octavian's department. Radeechy dies of a gunshot wound in his office. His body is found by his colleague Richard Biranne, the ex-husband of Paula Biranne, and the death is announced to Octavian by Peter McGrath, the office messenger. Octavian enlists the help of John Ducane to investigate the death.
Ducane learns that McGrath, the office messenger, has sold the story of Radeechy's suicide to the press. The leaked story included the information that Radeechy was a practitioner of black magic whose rituals involved the participation of naked women. It also alleged that Radeechy was being blackmailed. Later, Ducane makes a surprise visit to McGrath's home in the hope of getting more information, and is greeted in McGrath's absence by his wife Judy, who confirms that her husband had been blackmailing Radeechy. McGrath denies the charge, claiming that he was simply paid for helping with the magic rituals. He goes on to implicate Biranne, who he claims was a frequent visitor to Radeechy's home. McGrath tells him that Biranne, the first person to find Radeechy's body, had locked the office door when he went in. Remembering that Radeechy had been left handed and that the gun was found by his right hand, and puzzled by the absence of a suicide note, Ducane suspects Biranne of tampering with evidence. Ducane pays an unannounced evening visit to Biranne's house, where he finds Judy McGrath. He accuses her of being involved in Radeechy's magic rituals. She confirms his suspicion, and says that the rituals took place in a disused air raid shelter under the office building. Ducane gets McGrath to show him the underground chamber where Radeechy performed his rituals.
Eventually Biranne confesses to Ducane his involvement in the death of Radeechy. The previous year Biranne had been having an affair with Radeechy's wife Claudia and was at their house when Radeechy murdered her by pushing her from a window in a fit of jealousy. By helping Radeechy cover up the crime, making it appear to be an accident, he acted as an accessory to murder. Biranne tells Ducane that he was present when Radeechy shot himself and that he found, and took away with him, a suicide note in which Radeechy confessed to Claudia's murder and stated that Biranne had witnessed the crime. Ducane must decide whether or not to expose Biranne when he makes his report to Octavian. He reserves judgment for a few days, and advises Biranne to stop seeing Judy McGrath, with whom Biranne has been having an affair.
Meanwhile, in Dorset, many of the characters are suffering from unrequited love. The teenaged Pierce loves Octavian's daughter Barbie, as does Willy Kost. Theo is hopelessly in love with Pierce, and Pierce's mother Mary loves Willy. Mary confides in John Ducane, and he advises her to ask Willy to marry her, which she does. He is delighted and seems to agree, although he doesn't love her and claims to be impotent. Later, he tells her he can't marry her after all.
While visiting John Ducane in London, Willy encounters Jessica, who goes to Ducane's house to look for evidence of another woman. Willy catches her searching Ducane's bedroom and she tells him her story, after which they make love. He refuses to tell her his last name, and threatens to expose her spying to Ducane if she tries to see him again.
In despair over Barbie's seeming indifference to him, Pierce swims into a cave whose entrance is only accessible at low tide, with the intention of staying until the tide comes in. Ducane follows him and he, Pierce, and Pierce's dog Mingo, who has also followed the boy, spend a harrowing night huddling together on a ledge until they are able to swim out when the tide recedes. During his ordeal, Ducane contemplates his life's purpose, with important consequences for Biranne. "He thought, if I ever get out of here I will be no man's judge... To love and to reconcile and to forgive, only this matters. All power is sin and all law is frailty... Forgiveness, reconciliation, not law."
Back in London, Ducane tells Biranne that he will not expose his involvement with Radeechy if Biranne will attempt a reconciliation with his ex-wife Paula. Earlier, Paula had confided in Ducane that Richard had divorced her after she had an affair with another man, but that she still loved Richard. Richard and Paula meet and agree to reconcile.
The novel ends with several of the other characters forming couples. Ducane and Mary become engaged to be married, Pierce and Barbie have sexual intercourse for the first time, and Jessica travels from London to Trescombe House in search of Willy.