James Garfield, 1880.
I don’t count him because (A) he was a major general in the Union Army and (B) he had been elected by his legislature for a Senate seat when he instead became president.
Garfield might have been a very good President had he lived.