1844’s The Count of Monte Cristo is a standalone novel of revenge written by Alexandre Dumas. While it is not my usual SF, it has certainly influenced SF. As well, there were (to my surprise) not one but two SFnal moments in the book.
Young Edmond Dantès has it all, from a solid career to a loving fiancée. Alas for Dantès, success engenders jealousy. In short order he is framed for Bonapartist subversion and secretly consigned to life imprisonment in the forbidding Château d’If. His friends and loved ones will never know why he vanished.
At least, that’s the plan.