The Winter Sea by Susanna Kearsley
In the spring of 1708, an invading Jacobite fleet of French and Scottish soldiers nearly succeeded in landing the exiled James Stewart in Scotland to reclaim his crown. Now, Carrie McClelland hopes to turn that story into her next bestselling novel. Settling herself in the shadow of Slains Castle, she creates a heroine named for one of her own ancestors and starts to write. But when she discovers her novel is more fact than fiction, Carrie wonders if she might be dealing with ancestral memory, making her the only living person who knows of the betrayal that happened all those years ago.
The author's website