The Fifth Infantry was organized at Camp Randall, Madison, WI, and mustered into the service of the United States on July 13, 1861. The regiment left the state on the 24th of the same month going directly to Washington, D.C.
The regiment was assigned to General King's Brigade then in camp on Meridian Hill in the suburbs of Washington. Shortly thereafter was transferred and permanently attached to General Hancock's Brigade, remaining in the defenses of Washington until March 1862, when that part of the army of the Potomac then under the command of General George B. McClellan and to which the fifth belonged, was transferred to the vicinity of Hampton, VA, as a part of the forces to take part in what is known as the Peninsular Campaign, March 17 to September 2, 1862. During the campaign the Fifth participated in many sanguinary engagements. In the latter part of August the regiment returned to Centerville, Virginia, to assist in the support of that part of the Union Army then under the command of General Pope. In the retreat of the Union forces which followed, and the invasion of Maryland by the Confederates, known as the Maryland Campaign, the Fifth participated in the battle of Antietam.
During its whole term of service the Fifth was a part of the Army of the Potomac of the famous Sixth Corps, and took part in the various campaigns in Virginia, including Gettysburg, The Wilderness, Petersburg, Shenandoah Valley, Richmond and Appomattox. Subsequently the Fifth was transferred to Louisville, KY, where the regiment was mustered out of the service, returned to Madison, WI, and was disbanded on the 20th of July, 1865.