William early gained the favor of his young sovereign, James II, who regarded him as more his equal in age and rank than Sir William Crichton, the chancellor, who wished to govern both the king and kingdom. On 25 Aug. 1443 Douglas by the king's command, the king's council and household being with him, took Barnton, near Edinburgh, a castle held for Crichton by his cousin, Andrew Crichton. In November, at a general council in Stirling, Sir William Crichton, his brother, and their chief followers were forfeited, and Crichton deposed from his office. In revenge they harried the lands of Douglas, burnt his castles of Abercorn, Strabrook, and Blackness, and took five other of his strongholds. A papal dispensation in the following year, 24 July 1444, allowed Douglas to marry his cousin, the Fair Maid of Galloway, and so to unite the two principal estates of the family. In 1445 the castle of Edinburgh, still held by Sir William Crichton, after a stout defence of eleven weeks, capitulated to Douglas on terms which permitted Crichton to recover or retain the office of chancellor. But Douglas, who exercised the power, and perhaps received the title of lieutenant-general of the kingdom, maintained his ascendency in the royal councils.
The power of the Douglas clan was a serious threat to the house of Stuart, and culminated in the fatal confrontation at Stirling Castle where William wa killed, stabbed to death by King James II of Scotland, after attempting to mount opposition to the body of men about the King's person.
The earl was only twenty-seven at the date of his death and the king five years younger. The friendship of their boyhood adds to the horror of the tragedy. The character of Douglas, according to Hume of Godscroft, resembled more his grandfather and cousins put to death in Edinburgh Castle than his father's, for he endeavoured by all means to augment the grandeur of his house by bonds, friendships, and dependencies, retaining, renewing, and increasing them. This fatal ambition caused his untimely end, and again pursued by his brother and successor brought about the ruin of the house of Douglas.
Source www.thepeerage.com from The Dictionary of National Biography, Oxford Univ. Press
http://onlinebooks.library.upenn.edu/webbin/metabook?id=dnb