In 1862, Williams volunteered for the Union Army, and mustered into service with Company I of the 110th New York Infantry Regiment. The 110th New York Infantry shipped out from Baltimore to Fort Monroe, Virginia, and then to New Orleans, Louisiana, for service in the Lower Seaboard Theater of the American Civil War. They were assigned to the Department of the Gulf and participated in the Siege of Port Hudson and the Battle of Irish Bend. Williams resigned due to disability in early 1864 after 18 months of service.