As one of the main military leaders on the border to Scotland, Harclay became frustrated with Edward II's inactivity, particularly the humiliating English defeat at the Battle of Old Byland on 14 October 1322, which made it clear that the war could not be won. Harclay initiated negotiations with the Scots on his own accord, and on 3 January 1323, he signed a peace treaty with Robert the Bruce. The act was without royal sanction, and amounted to treason. The king issued an arrest order for the earl, and on 25 February Harclay was taken into the king's custody. He was arraigned before royal justices on 3 March, denied a hearing, and executed the same day. He was hanged, drawn and quartered, and the various parts of his body displayed in different parts of the country. His alleged treason, capture and execution is described in the Lanercost Chronicle. Only after five years was he allowed a proper burial, but the conviction for treason was never annulled.