
When the Civil War began, James Garfield had just been admitted to the Ohio bar in 1861 and had joined the local Republican Party and finished a term as an Ohio state senator. He had thought that secession was unlikely. But after Abraham Lincoln's election, he accepted that war was coming. On February 13, 1861, newly elected President Abraham Lincoln arrived in Cincinnati by train to make a speech. Garfield described Lincoln as "distressingly homely", but had "the tone and bearing of a fearless, firm man."
When the war began Garfield tried in vain to obtain an officer's commission in the Union Army. Ohio Governor William Dennison, Jr. asked Garfield to travel to Illinois to acquire rifles and to negotiate with the Governors of Illinois and Indiana for the consolidation of troops. In the summer of 1861 he was finally commissioned a lieutenant colonel in the Union Army and given command of the 42nd Ohio Volunteer Infantry.
General Don Carlos Buell assigned Colonel Garfield the job of driving Confederate forces out of eastern Kentucky in November 1861. In December, he departed Catlettsburg, Kentucky,and when the army reached Paintsville, Kentucky, on January 6, 1862, Garfield's cavalry engaged the Confederates at Jenny's Creek. Garfield is said to have positioned his troops so as to deceive the enemy into thinking that it was outnumbered, when in fact it was not. The Confederates withdrew to the forks of Middle Creek, two miles from Prestonsburg, Kentucky. Garfield attacked on January 9, 1862. The Confederates withdrew but Garfield did not pursue them, opting instead to resupply his men. His victory brought him a promotion to the rank of brigadier general on January 11.
Garfield went on to commanded the 20th Brigade of Ohio under General Don Carlos Buell at the Battle of Shiloh, where he led troops in an attempt, delayed by weather, to reinforce Maj Gen. Ulysses S. Grant, after a surprise attack by Confederate General Albert S. Johnston. He then served under Thomas J. Wood in the Siege of Corinth, where he assisted in the pursuit of Confederates in retreat by the overly cautious Maj. Gen. Henry W. Halleck, which resulted in the escape of Gen. P. G. T. Beauregard and his troops. Garfield was furious over his commander's timidity.
That summer his health suddenly deteriorated, including jaundice and significant weight loss. Garfield was forced to return home, where his wife nursed him back to health. He returned to duty that fall and served on the Court-martial of Fitz John Porter. Garfield was then sent to Washington to receive further orders.
In the spring of 1863, Garfield was appointed Chief of Staff for William Rosecrans, commander of the Army of the Cumberland. Rosecrans loved to talk and he got along well with Garfield, who he called "the first well read person in the Army". The two men became close friends. Garfield created one of the best intelligence corps unsurpassed in the Union Army. Garfield designed a battle plan to pursue and trap Confederate General Braxton Bragg in Tullahoma. The army advanced to that point with success, but when Bragg retreated toward Chattanooga, Rosecrans stalled his army and requested additional troops and supplies. Garfield argued with Rosecrans to keep after Bragg and planned a cavalry raid behind Bragg's line. The raid failed, due in part to poor execution and weather.
At the Battle of Chickamauga, Rosecrans issued an order which sought to fill a gap in his line, but which actually created another one. When the Confederates took advantage of the mistake, Rosecrans concluded that that this conclusion was wrong. Rosecrans's army had avoided complete loss, but they were left in Chattanooga surrounded by Bragg's army. Garfield sent a telegram to Secretary of War Edwin M. Stanton alerting Washington to the need for reinforcements and 20,000 troops were sent to Chattanooga by rail within nine days.
One of Ulysses Grant's early decisions on assuming command of the Union Army was to replace Rosecrans with George H. Thomas. Garfield was issued orders to report to Washington, where he was promoted to major general. He was unsure of whether he should return to the field or assume the Ohio congressional seat he had won in October 1862. After a discussion with President Lincoln, Garfield opted for Congress and he resigned his commission.
In Congress, Garfield developed a close alliance with fellow Ohioan Salmon P. Chase, Lincoln's Treasury Secretary. Garfield became a member of the Radical Republicans, led by Chase. Garfield was critical of some of Lincoln's decisions, but praised the Emancipation Proclamation. He supported the need for a military draft, and he was the only Republican vote to terminate the use of bounties in recruiting. (Some financially able recruits had used the bounty system to buy their way out of service.)

Garfield, sided with the Radical Republicans on some issues. He supported the confiscation of southern plantations and exile or execution of rebellion leaders. He said that Congress should "determine what legislation is necessary to secure equal justice to all loyal persons, without regard to color." In the Presidential election of 1864, Garfield was not thrilled about Lincoln's re-election, but he saw no other viable alternative, writing "I have no candidate for President. I am a sad and sorrowful spectator of events." He attended the party convention and promoted Rosecrans for the V.P. nomination.
When Lincoln was assassinated, Garfield took on the role of peacemaker between Congress and Andrew Johnson. But when Johnson vetoed continuing the Freedmen's Bureau, Garfield rejoined the Radicals.