He maintained that his primary pen name came from his years working on Mississippi riverboats, where two fathoms, a depth indicating "safe water" for the boat to float over, was measured on the sounding line. A fathom is a maritime unit of depth, equivalent to two yards (1.8 m); "twain" is an archaic term for "two". The riverboatman's cry was "mark twain" or, more fully, "by the mark twain", meaning "according to the mark [on the line], [the depth is] two [fathoms]", that is, "there are 12 feet (3.7 m) of water under the boat and it is safe to pass".

Twain claimed that his famous pen name was not entirely his invention. In Life on the Mississippi, he wrote:

Captain Isaiah Sellers was not of literary turn or capacity, but he used to jot down brief paragraphs of plain practical information about the river, and sign them "MARK TWAIN," and give them to the New Orleans Picayune. They related to the stage and condition of the river, and were accurate and valuable; ... At the time that the telegraph brought the news of his death, I was on the Pacific coast. I was a fresh new journalist, and needed a nom de guerre; so I confiscated the ancient mariner's discarded one, and have done my best to make it remain what it was in his hands—a sign and symbol and warrant that whatever is found in its company may be gambled on as being the petrified truth; how I have succeeded, it would not be modest in me to say.

Twain's version of the story regarding his nom de plume is not without detractors and has been called into question by biographer George Williams III, the Territorial Enterprise newspaper and Purdue University's Paul Fatout. These sources claim that "mark twain" refers to a running bar tab that Twain would regularly incur while drinking at John Piper's saloon in Virginia City, Nevada.