At the beginning of the Civil War, he became major in the 70th New York Volunteer Infantry Regiment, which was raised and commanded by General Sickles. He distinguished himself for gallantry in all the engagements in which Sickles's brigade took part, and was promoted colonel of his regiment. At the Battle of Williamsburg, 5 May 1862, he was severely wounded, but recovered in time to take part in the battles of Fredericksburg, Chancellorsville, and Gettysburg. (Colonel Farnum's name appears in the Graffiti House in Brandy Station, Virginia from this period.) He was then compelled by his wounds to abandon active service, and accepted the colonelcy of the 11th regiment of the veteran reserve corps, which he retained until the close of the war.