The story
From sword + mage. Rarely used before December 2007 (or November: see quotation), when it was included in the first preview of the Dungeons & Dragons 4th edition, Wizards Presents: Races and Classes.
Etymology from Wiktionary, CC BY-SA 4.0.