Shakespeare got his story ideas from a number of different
writers. Two major ones are Raphael Holinshed, whose Chronicles of
England, Scotland and Ireland provided the storylines for all of
the history plays and also for Macbeth, eleven plays in all, and
Plutarch, whose Lives of the Greeks and Romans provided the
storylines for Julius Caesar, Antony and Cleopatra and Coriolanus.
The rest were one-offs: As You Like It came from Lodge's Rosalind;
Romeo and Juliet from Brooke's Romeus and Juliet; King Lear from
the old anonymous Queen's Men play King Leir; The Comedy of Errors
from Plautus's Menaechmi; etc. etc. Shakespeare also occasionally
created his own plot, particularly in The Merry Wives of Windsor,
The Tempest and A Midsummer Night's Dream