When a Scot Ties the Knot (Castles Ever After #3) by Tessa Dare

In order to avoid social situations, Madeline Gracechurch tells a small little lie - she is engaged to Captain MacKenzie. Everyone believes him to be real, but Maddie has completely made him up and sends him fake letters to prove her devotion. After many years of this deception, she fakes his death and everyone leaves her to live her own life. After she's inherited a castle however, the real Captain Logan MacKenzie shows up, ready to get married like she promised in her letters.