When Shakespeare wrote Henry IV, Part I and the sources he used as the basis for the play.
Henry IV Part I was written and first performed around 1596-7. It was entered in the Stationers' Register on 25 February 1598 as The History of Henry the Fourth. The first surviving edition of the play dates from the same year and an earlier edition (almost certainly also from 1598) exists in part. Five more Quarto editions were printed before the play appeared in the First Folio in 1623, testifying to the play's contemporary popularity.
As with most of his History plays, Shakespeare's principal source was Holinshead's Chronicles, with events and characters rearranged for dramatic purpose – in reality, for example, Prince Hal and Hotspur were not young rivals, Hotspur being the elder by 24 years. Shakespeare also drew on an earlier anonymous play, The Famous Victories of Henry V, which has many superficial similarities with Shakespeare's play and features the reprobate character Sir John Oldcastle. Shakespeare's Falstaff was originally called Oldcastle, but was subsequently renamed following protests from descendants of the Oldcastle family.