As the 1850s drew to a close, and the debate over slavery degenerated into war, Garfield began to shift away from teaching and to pursue his new interest in politics. He cast his first vote for president in 1856 for the Republican candidate, John C. Fremont, and even made several pro-Republican speeches in and around Hiram.
In 1859, on top of his classes and his duties as principal of the Western Reserve Eclectic Institute, Garfield began studying law. He joined the Cleveland Law Firm of Williamson and Riddle as a student-at-law, and two years later, just before the Civil War began, Garfield passed the Ohio bar exam.
In 1859, Garfield easily won the Republican nomination for state senator and entered the senate in 1860 at the young age of twenty-eight. Garfield became interested in tax revenue and state appropriations, which lead him to become one of the senate's top fiscal legislators.
The upcoming war, however, soon overshadowed all other debate. Garfield opposed a Constitutional amendment that would have prohibited Congress from interfering in slavery issues. By the end of the term South Carolina had seceded and the Ohio governor, Salmon P. Chase, had left to become Abraham Lincoln's treasury secretary. The state began to mobilize for war.
Lincoln's election in 1860 had set in motion a series of events that catapulted the United States into civil war. A dozen dissident states seceded from the union to form the Confederate States of America, and the two sides fought the first battle of the Civil War at Bull Run. As 1861 dragged on, both sides mobilized for a long war, although neither side had any idea how long and how costly the war would become.
When the legislature adjourned for the year, Garfield offered his services to the state militia. Although he was completely untrained, the governor granted Garfield a commission as lieutenant-colonel of the forty-second regiment of Ohio volunteers on August 14, 1861. As he often did when entering a new endeavor, Garfield began a quick study of military strategy, then set about developing a four-month drilling regimen for his men at Camp Chase near Columbus, Ohio. On December 15, 1861, Garfield presented his newly-trained soldiers to the Union high command at Louisville. When Confederate troops overran eastern Kentucky, Garfield was promoted to the command of the Eighteenth Battalion, and although this assignment greatly exceeded Garfield's experience, he applied the same quick learning style and easy-going manner that had worked so well for him in school, and proved himself to be an excellent soldier.
Garfield was assigned the task of removing the army of Confederate General Humphrey Marshall from eastern Kentucky. Marshall, who had trained at West Point, had almost twice the number of troops as Garfield, as well as the support of many citizens of Kentucky. Garfield rapidly moved his force across the state and, by using the element of surprise, kept Marshall's forces off-balance. Marshall eventually abandoned his position and, leaving many of his supplies behind, began to retreat. Garfield's forces caught up with Marshall and managed to stall him until reinforcements arrived. On January 12, 1862, Marshall's line broke and Garfield won the battle. The victory was one of the few battles that the Union won in this early phase of the war, and President Abraham Lincoln promoted Garfield to major-general of volunteers, making him the youngest commander in the Union.