From a farm a few miles southwest of Beloit, in the year 1861, he enlisted in the Eighth Illinois cavalry as assistant quartermaster, was soon elected a captain, and early in 1863 was made acting lieutenant colonel and chief quartermaster of the Fourth Army Corps under General Pleasanton. In May, 1863, he became an aide on that general's staff, and June 29, 1863, on the eve of the battle of Gettysburg, when one month less than twenty-six years old, he was commissioned brigadier general in Kilpatrick's division. On that famous field, July 3, 1863, after Pickett's charge had been repulsed, Farnsworth 's brigade occupied a wooded hill to the left of Round Top immediately in front of the First Texas Regiment of infantry, which was posted behind a rail fence that had been made impassable for cavalry. Twice the Texans and their impregnable fence had been charged by the gallant First West Virginia Regiment, but in vain.