Then the King established all the knights, and gave them riches and lands; and charged them never to do outrage nor murder, and always to flee treason, and to give mercy unto him that asketh mercy, upon pain of forfeiture of their worship and lordship of King Arthur for evermore; and always to do ladies, damosels, and gentlewomen and widows succour; strengthen them in their rights, and never to enforce them, upon pain of death. Also, that no man take no battles in a wrongful quarrel for no love, nor for no worldly goods. So unto this were all the knights sworn of the Table Round, both old and young. And every year so were they sworn at the high feast of Pentecost.
Thomas Malory (c. 1415-1471) English writer
Le Morte d’Arthur, Winchester Ed., Book 3, ch. 15 (1485)
(Source)
The Caxton version reads:Then the king stablished all his knights, and them that were of lands not rich he gave them lands, and charged them never to do outrageousity nor murder, and always to flee treason; also, by no means to be cruel, but to give mercy unto him that asketh mercy, upon pain of forfeiture of their worship and lordship of King Arthur for evermore; and always to do ladies, damosels, and gentlewomen succour, upon pain of death. Also that no man take no battles in a wrongful quarrel for no law, nor for no world's goods. Unto this were all the knights sword of the Table Round, both old and young. And every year were they sworn at the high feast of Pentecost.
A spurious, modern version of this oath is frequently found attributed to Malory:I will develop my life for the greater good. I will place character above riches, and concern for others above personal wealth, I will never boast, but cherish humility instead, I will speak the truth at all times, and forever keep my word, I will defend those who cannot defend themselves, I will honor and respect women, and refute sexism in all its guises, I will uphold justice by being fair to all, I will be faithful in love and loyal in friendship, I will abhor scandals and gossip -- neither partake nor delight in them, I will be generous to the poor and to those who need help, I will forgive when asked, that my own mistakes will be forgiven, I will live my life with courtesy and honor from this day forward.
Needless to say, Malory never wrote about refuting "sexism." This modern version may have originated with "The International Fellowship of Charity-Now," whose site quotes Malory above (as well as additional aspects of the oath that Tennyson included in Idylls of the King) and then lays out the modern oath broken out into twelve "trusts."