If you're asking about candidates from the two main parties, then the most recent I can find is Charles Evans Hughes who ran against Woodrow Wilson in 1916. Hughes stepped down from his seat on the Supreme Court to run for elected office, and was later made Chief Justice during the Hoover administration. I cant speak to why keeping facial hair fell from fashion though. Hope this helps.
http://loc.gov/pictures/resource/cph.3b15401/ (Here's a link to a picture of Hughes)
Hi, you may be interested in the answers in these threads
Why did facial hair fall out of favor among United States Presidents? - featuring /u/captmonkey. Includes links to a few more
Why did facial hair fall out of fashion for American Politicians in Federal Politics? - featuring /u/cecikierk and /u/chocolatepot