Attempting to improve Anglo-Scottish relations during the medieval period could be a perilous occupation.

Take Andrew Harclay. In March 1323 he was hanged, drawn and quartered at Carlisle. His severed head was sent to the Yorkshire town of Knaresborough, temporary billet of Edward II, and from there to London. It would be displayed on London Bridge for five years. The remainder of Harclay's corpse was also pressed into service as a none-too-subtle warning of the consequences of treason. The citizenries of Carlisle, Bristol, Dover and Newcastle would all have their chance to gaze upon a quarter of Harclay's slain body.

This was an ignominious end for someone who had only recently been hailed as a hero by the English. Harclay was the man who had fended off Robert Bruce's assault on Carlisle Castle back in 1315 and, less than a year before his execution, he had won a famous victory at the Battle of Boroughbridge. What, then, was his terrible crime? Nothing more sinister than growing tired of the endless, often futile, fighting between the realms. He went to the Scots in search of a peace treaty but did so without his king's permission. This was deemed to be treacherous and Harclay paid an awful price.

Incidents such as this permeate the story of how England and Scotland squabbled for long centuries, and of how so many souls were caught in the crossfire. Invading armies went this way and that, towns were routinely occupied, and some of Britain's bloodiest battles cost tens of thousands of lives.

There are many wonderful popular history books to be written about all of this but, so far, too few have arrived on our shelves. The same cannot be said of Mary Queen of Scots: a figure who, let us be frank, has had far too many biographers. The title of Linda Porter's book may therefore provoke misgivings: not again, you may mumble. Fear not, however. The clue is in the subtitle: "fatal inheritance". Porter certainly revisits the sad tale of Mary Stuart but the bulk of her book takes us farther back in time. Not as far as the ill-fated Harclay, but well into the 15th century. The book is elegantly written, decently researched and, crucially, it will alert a new readership to a neglected subject.

The stars of the show are Henry VII, England's first Tudor monarch, and James IV of Scotland. Both men ruled with some precariousness ("gaining the throne was one thing. Keeping it was quite another") but Porter makes a convincing case that they were more talented than is often supposed. They were also great rivals: attempting to make their relatively minor proto-nations count for something in the world of European high politics and more than happy to intervene in each other's affairs.

Sometimes this required skulduggery (James's support for the pretender Perkin Warbeck, for example) but sometimes there were happier results. One of the finest sections of Porter's book concerns Margaret Tudor, Henry's daughter, who became James's teenage bride. Margaret is a fascinating figure. She came with an impressive dowry (worth around £6 million in today's money), which was very welcome in a cash-strapped Scotland, though James immediately spent the equivalent of £1m on the wedding celebrations.

Margaret's first deed as queen was to insist her husband shave off his unkempt beard and this act of self-assertion was an early hint that Margaret would not be intimidated by life in a strange and foreign land. She became fluent in Scots, contributed to a vibrant court culture, and, despite the occasional infidelity on the part of her husband, enjoyed a relatively happy marriage — at least for as long as it lasted.

Marital union could not prevent Scotland and England returning to bad habits and by 1513 thousands of men were being slaughtered at Flodden. Porter does not chastise James for his role in these events. He was "no hothead bent on glory": Porter argues that the war had popular support, that counsel was carefully sought, and that James believed he had a fair chance of securing victory. Small comfort to Margaret, who became a widow at 23, had to seek out a new husband, and eventually had to flee home to England leaving behind her young sons.

And so the whirligig continued. Porter takes us through the rest of the 16th century, all the way up to the drama of Elizabeth I and Mary Stuart. There are many highlights: the account of James V's 1536-37 trip to France stands out, and best of all is the famous first encounter between Mary and John Knox — not the queen's greatest admirer. "If the realm finds no inconvenience from the rule of a woman," Knox announced, "I shall be as well content to live under your grace as St Paul was to live under Nero." Say what you will about Knox, but he was the master of stinging one-liners.

Porter claims that "for most English-speaking people, Mary Queen of Scots is the only Scottish ruler they have heard of, with the possible exception of Robert the Bruce". This, surely, is an exaggeration but it is certainly high time that we heard more about the many interesting characters who feature in this charming and informative book.

Linda Porter is at the Edinburgh International Book Festival, with Rosalind Marshall, on August 14 at 10.30am.