Shakespeare borrowed the character of Banquo from Holinshed's Chronicles, a history of Britain published by Raphael Holinshed in 1587. In Chronicles Banquo is an accomplice to Macbeth in the murder of the king, rather than a loyal subject of the king who is seen as an enemy by Macbeth. Shakespeare may have changed this aspect of his character in order to please King James, who was thought at the time to be a descendant of the real Banquo. Critics often interpret Banquo's role in the play as being a foil to Macbeth, resisting evil where Macbeth embraces it. Sometimes, however, his motives are unclear, and some critics question his purity. He does nothing to accuse Macbeth of murdering the king, even though he has reason to believe Macbeth is responsible.
Source
Shakespeare often used Raphael Holinshed's Chronicles of England, Scotland, and Ireland—commonly known as Holinshed's Chronicles—as a source for his plays, and in Macbeth he borrows from several of the tales in that work. Holinshed portrays Banquo as an historical figure: he is an accomplice in Mac Bethad mac Findlaích's murder of Donnchad mac Crínáin and plays an important part in ensuring that Macbeth, not Máel Coluim mac Donnchada, takes the throne in the coup that follows. Holinshed in turn used an earlier work, the Scotorum Historiae by Hector Boece, as his source. Boece's work is the first known record of Banquo and his son Fleance; and scholars such as David Bevington generally