The castle was once the home of James Hepburn, Earl of Bothwell , and Mary I of Scotland made a famous marathon journey on horseback to visit him there, only a few weeks after the birth of her son.