Garfield volunteered for service and began as a lieutenant colonel. He later became a colonel of the 42nd Ohio Volunteer Infantry. Many of his soldiers were young men he had taught, and they displayed great loyalty to their former teacher. He fought at the Battles of Middle Creek, Shiloh, and Chickamauga. At the Battle of Chickamauga in January 1863, he distinguished himself with bravery through enemy fire. Major General William Rosecrans, for whom Garfield served as chief of staff, praised him as having the skills of a great commander.