The moral reconciliation occurs during the third scaffold scene in Chapter 23 when Dimmesdale mounts the scaffold that Hester had stood on seven years earlier and he admits he is the father of Pearl.
During the entire novel, Dimmesdale has been hiding this secret from the public and the guilt has eaten away at him both mentally and physically. He realizes that he can no longer keep the truth from the community and confesses his guilt. This removes the stain of suspicion from Pearl, who had been rumored to be the devil's child. It also casts a whole new light on Hester, whose reasons for keeping the name of the father a secret are now revealed. And it puts an end to Chillingworth's search for revenge because he can no longer keep torturing the minister with his secret guilt. In fact, Chillingworth says, "thou has escaped me."
This revelation leads to the theme of the novel which Hawthorne says is
“Be true! Be true! Be true! Show freely to the world, if not your worst, yet some trait whereby the worst may be inferred!”
With nothing left to live for, Chillingworth dies and leaves his fortune to Pearl. This allows Hester to leave Boston, raise Pearl in England until she is happily married, and to return to Boston and become known as an "angel" instead of an "adulteress".