Two Years Before the Mast is a book by the American author Richard Henry Dana, Jr., written after a two-year sea voyage starting in 1834 and published in 1840.
While at Harvard College, Dana had an attack of the measles that affected his vision. Thinking it might help his sight, Dana, rather than going on a Grand Tour as most of his fellow classmates traditionally did (and unable to afford it anyway), and being something of a nonconformist, left Harvard to enlist as a common sailor on a voyage around Cape Horn on the brig Pilgrim. He returned to Massachusetts two years later aboard the Alert (which left California sooner than the Pilgrim).
He kept a diary throughout the voyage, and, after returning, he wrote a book based on his experiences. Recognized as an American classic, Two Years Before the Mast was published the same year that Dana was admitted to the bar.