What does the phrase “to walk the chalk” mean and Where did it come from?

In present day American use, one who is made “to walk the chalk” must walk a line of rectitude and sobriety, not deviating a hair’s breadth, or he must obey the rules closely.

The significance is alleged to have been of nautical origin, a straight chalk line drawn along the deck, or a narrow lane between two lines, to test the sobriety of a sailor; if he could not walk the length of the line placing each foot directly on it, or if he was unable to keep within the two lines of the lane, he was adjudged to be too drunk for duty and was clapped into the brig.

By the time the expression had become a matter of literary record, back in 1823, however, the test was military and altogether a friendly competition among soldiers to discover who was the most sober. The British say that the original test was a custom in the American navy, but the Dictionary of American English has no record of it.

Both in England and America, however, there was another meaning of “to walk the chalk (or chalks).” It is now obsolete in America, but its meaning was to take one’s speedy departure. Mark Twain used it in Sketches, New and Old, “If anybody come meddlin’ wid you, you jist make ’em walk chalk.”

This usage is recorded in Eng land as early as 1842, though the original allusion cannot be ascertained.