How many years before his death did Thomas Hardy publish his last novel?

Thomas Hardy published his last novel thirty-three years before his death.

Hardy’s last novel was Jude the Obscure (1895), the story of Jude Fawley’s adulterous love for his cousin Sue Bridehead.

The novel so shocked readers that Hardy gave up writing fiction and turned to poetry. Hardy died in 1928.