The deutero-canonical Book of Judith tells how Judith saved her people by seducing and killing Holofernes, the Assyrian general. Judith gets Holofernes drunk, then seizes his sword and decapitates him: "Approaching to his bed, she took hold of the hair of his head, and said, Strengthen me, O Lord God of Israel, this day! And she smote twice upon his neck with all her might, and she took away his head from him." (Judith, 13:7-8).
The beheading of Holofernes was a favourite subject of the age, depicted by such names as Donatello, Sandro Botticelli, Andrea Mantegna, Giorgione, Artemisia Gentileschi, and Lucas Cranach the Elder, among many others. Caravaggio's approach was, typically, to choose the moment of greatest dramatic impact, the moment of the decapitation itself. The figures are set out in a shallow stage, theatrically lit from the side, isolated against the inky, black background. Judith and her maid Abra stand to the right, partially over Holofernes, who is vulnerable on his back. X-rays have revealed that Caravaggio adjusted the placement of Holofernes' head as he proceeded, separating it slightly from the torso and moving it slightly to the right. The faces of the three characters demonstrate his mastery of emotion, Judith in particular showing in her face a mix of determination and repulsion. Artemisia Gentileschi and others were deeply influenced by this work, and even surpassed Caravaggio's physical realism, but none matched his capture of Judith's psychological ambivalence.
The model for Judith is probably the Roman courtesan Fillide Melandroni, who posed for several other works by Caravaggio around this year; the scene itself, and especially the details of blood and decapitation, were presumably drawn from his observations of the public execution of Beatrice Cenci a few years before.