I've recently read Cameron McNeish's book on the Scottish National Trail - "Scotland End to End"- not his best work, to be honest, although his description of the route that you are interested in is good, with lots of history thrown in. The book somehow loses it's way when it enters the Highlands.
The route follows St Cuthbert's Way from KY to Melrose. The last day of this would be good, as it takes you through the Eildon Hills, which I climbed a few years ago (worth a diversion to the tops as they are excellent viewpoints), and down into Melrose, a beautiful small town full of history (we stayed in in our camper van at the town's caravan site).
The route then follows the Southern Upland Way westwards for a while, before dropping down to the Tweed Valley and Peebles. There is a disused railway line running between Innerleithen and Peebles that has been converted into a cycleway - I have walked the section from Cardrona into Peebles, very pleasant (and there is a good small café on the western side of Cardrona). We stayed at the Rosetta campsite on the NW side of town.
The route from here then follows drovers roads to West Linton, and over the Pentland Hills, before picking up on the Water of Leith Path, which leads all the way down to the coast at Leith through western Edinburgh - I've walked a bit of the lowest section.