Looking up the word, it seems to come from old-French couard and the word ‘coward’ was adopted in Middle English (remembering Shakespeare’s Hamlet, 'thus conscience doth make cowards of us all’)
However, in regards to cowardice being refered to suicide, There doesn’t seem to be a clear origin. It seems to be a recent phenomenon. In Tom Hanks’s film, Bridge of Spies, his character mentions to the judge about the spy that ‘he did not take the cowards way out’ . Either this could be a historical error in the use of the word or indeed it was used commonly in the 20th century…don’t really know and don’t want to make speculations.
Poking around with google ngram and book searches, the earliest result I could find where “coward’s way out” specifically referred to suicide was a book from 1913. There are a few more suicide references in the 1920s and 1930s. The phrase was common enough to end up in print on many occasions.
Bridge of Spies isn’t terribly accurate, historically speaking, but it’s use of the phrase “coward’s way out” is reasonable.