Warfield chose to run for Governor of Maryland in 1899, but lost the Democratic nomination after he was opposed by influential Maryland politicians, including Arthur Pue Gorman, a powerful U.S. Senator who had his own state political machine and was allied to similar interests and "old pols" in Baltimore City. However, even though it was apparent the party bosses did not hold him in favor, he again sought the nomination in 1903 openly discouraging African-Americans' ability to vote. He was successfully nominated by the party, and defeated his Republican opponent, Stevenson A. Williams, by over 12,600 votes. He was inaugurated as the 45th Governor of the "Old Line State" on January 13, 1904.