I had thought this a translation of a German phrase, as it’s usually connected with Hitler’s purge of the SA, but although the German phrase (Nacht der langen Messer) is an old one and pre-dates Hitler the original is apparently English.
2. Phr. (night of) the long knives: a treacherous massacre (as, according to legend, of the Britons by Hengist in 472, or of Ernst Roehm and his associates by Hitler on 29-30 June 1934); hence used allusively of any similarly decisive or ruthless action.
The massacre of the Britons is described by Geoffrey of Monmouth in Historia Regum Britanniæ Bk. VI. xv.
1862 BORROW Wild Wales II. xx. 226 Hengist had commanded..that..each Saxon should draw his long sax, or knife,..and should plunge it into the throat of his neighbour… This infernal carnage the Welsh have appropriately denominated the treachery of the long knives. 1891 E. C. BREWER Historic Note-Bk. 531/2 Long Knives (The Plot or Treachery of the). This was a treacherous conference to which Geoffrey of Monmouth tells us the chief Britons were invited by Hengist at Ambresbury; others say by Vortigern. Beside each Briton a Saxon was seated, armed with a long knife; and, at a given signal, each Saxon slew the Briton seated by his side. Geoffrey tells us the signal was the utterance of these words: Nemet oure Saxas, and that the number massacred was 460. 1936 R. OLDEN Hitler the Pawn xvi. 378 The consequence is massacre, ‘the night of the long knives’, a St. Bartholomew’s night.
Wikipedia has this but gives no indication just how old the phrase is in German.
The phrase “Night of the Long Knives” in the German language predates the massacre itself, and until it became synonymous with the purge, it referred generally to acts of vengeance.
Actaully none of the early cites in OED are figurative. Perhaps German was first with the figurative usage?