Always do right. This will gratify some people, and astonish the rest.
Mark Twain (1835-1910) American writer [pseud. of Samuel Clemens]
Letter (1901-02-16) to the Young People’s Society, Greenpoint Presbyterian Church, Brooklyn
(Source)
The Society had invited Twain to come and speak. In response, he sent a card with this aphorism on it. A reproduction is in the frontispiece of Bernard DeVoto, ed., Mark Twain in Eruption (1922), which was the earliest citation I could find.