No, it is not. It's also not based on ANY of Hammesfahr's other novels. It's an original story.
However, it should be noted that The Sinner is a hybrid anthology series that's using Detective Ambrose as story axle character. Season two features him working on a new case, while also diving more into his own childhood. According to this article:
It looks like the second season of the USA show will be entirely
original. Showrunner and executive producer Derek Simonds did not base
the new season on any particular true story, or on any of Hammesfahr's
other novels. It's possible that details might be reminiscent of
actual cases since true crime is so prevalent that commonalities are
hard to avoid, but the goal wasn't to take inspiration from outside
And confirmed by an interview with Executive Producer Derek Simonds via Variety
The first season of USA psychological crime thriller “The Sinner” took
its story, structure and tone from Petra Hammesfahr’s novel. But the
second season is its own, completely original mystery.
Without a pre-existing plot to follow, Derek Simonds created a new
story about why someone would commit a seemingly unprovoked murder.
This time the culprit is a 13-year-old boy Julian (played by Elisha
Henig), and it’s clear from the start that he is guilty. The show
follows the first season’s structure of unraveling the complicated
reasons behind the crime, a similarity Simonds wanted to echo