During an unsuccessful senatorial bid in 1914, Stanley assumed an anti-prohibition stance. This issue would dominate his political career for more than a decade and put him at odds with J. C. W. Beckham, the leader of the pro-temperance faction of the state's Democratic Party. In 1915, Stanley ran for governor, defeating his close friend Edwin P. Morrow by just over 400 votes in the closest gubernatorial race in the state's history. Historian Lowell H. Harrison called Stanley's administration the apex of the Progressive Era in Kentucky. Among the reforms adopted during his tenure were a state antitrust law, a campaign finance reform law, and a workman's compensation law. In 1918, Stanley was chosen as the Democratic nominee to succeed the recently deceased senator Ollie M. James. Stanley was elected, but did not resign as governor to take the seat until May 1919 and accomplished little in his single term. He lost his re-election bid to Frederic M. Sackett in the 1924 Republican landslide and never again held elected office. He died in Washington, D.C., on August 12, 1958.