The “glory” of war is a lie sold by cowards in suits. You don’t die a hero; you die screaming in your own filth while a politician cashes a check.
Ernest Hemingway (1899–1961) American writer
(Spurious)
Hemingway was no fan of the "romance" of war (see For Whom the Bell Tolls and A Farewell to Arms for examples such as this, or his essay "Notes on the Next War," e.g., here), but this passage, popular on social media, is not found in Hemingway's fiction, letters, or other writings, and doesn't appear to predate 2024.

