 William McKinley was born in Niles , Ohio , in 1843 . He left college to work as a teacher , and enlisted in the Union Army when the American Civil War broke out in 1861 . He served throughout the war , ending it as a brevet major . Afterwards , he attended Albany Law School in New York state , and was admitted to the bar in Ohio . He settled in Canton , Ohio , and after practicing law there , was elected to Congress in 1876 , and except for short periods served there until 1891 . In 1890 , he was defeated for re @-@ election , but was elected governor the following year , serving two two @-@ year terms . 
