Better to fail at doing the right thing than to succeed at doing the wrong thing
See the quote on “Better to fail at doing the right thing than to succeed at doing the wrong thing.” by Guy Kawasaki and other quotes about quotes about doing the right thing on Quotesers.com