That's all she wrote
An articulation of a sudden and unforeseen end to one's hopes or plans.
This is very much an American expression so let's begin with a clarification for readers in the UK where it isn't in common use. The phrase is used to convey the meaning of 'it's all over; there's no more to be said'. When seeking the expression's origin it would help to know who 'she' was and what exactly it was that she wrote. As we shall see, and as so often with etymology, that's not entirely clear.
The popular version of the origin of this expression is that it is the punch line of a mournful tale about an American GI serving overseas in WWII. The said sad serviceman is supposed to have received a letter from his sweetheart. He reads it to his colleagues: "Dear John". Well, go on, they say. "That's it; that's all she wrote". The story is plausible; 'Dear John' was the standard cipher amongst the US military for the kind of letter that has now been replaced by a 'you're so dumped' text message.
The 'Dear John' usage came into being at about the time of WWII. There are several references in 1940s newspapers to 'Dear John' letters that were sent by Franklin Roosevelt, who is sometimes credited with originating the term. These appear to be red herrings in the search for the origin of the phrase and merely allude to letters that FDR sent to prominent public figures who happened to be called John - John Lord O'Brian and John Maynard Keynes for example.
The earliest example I can find that refers to 'Dear John' letters with the commonplace meaning is from the Florida newspaper the St. Petersburg Times, March, 1944:
The things that brought tears to their eyes included... the downcast GI about whom another told them "He just got a Dear John letter."
Those citations give us an approximate date for the emergence of the expression but not the actual source. We may choose to believe the tale about the GI whose letter consisted of just "Dear John" but there's no evidence of any sort to support it.
I got a letter from my mama, just a line or two
She said listen daddy your good girl's leavin' you
That's all she wrote - didn't write no more
She'd left the gloom a hanging round my front door.
[If you want to hear it, and it is a classic of the country music genre, follow this link to YouTube.]
Tubb may have picked up the expression from popular usage but there aren't any examples of it from before 1942 and his version makes no reference to the military setting. Another explanation, and this seems very likely, is that GIs heard the Tubb song on the radio and adapted it to their circumstances.
See other phrases that were coined in the USA.