Following initial assignments at Fort McHenry, Maryland, and Fort Monroe, Virginia, he served in the Philippines during the Spanish–American War. Following his transfer to the Ordnance Corps as a First Lieutenant in October 1898, Williams spent a short time at Rock Island Arsenal and, then, inspected gunpowder for three years at the DuPont Powder Works in Wilmington, Delaware. As a Captain, he spent the period from August 1902 until April 1904 as an assistant to Brigadier General William Crozier, the Army's Chief of Ordnance in Washington. Several years at Rock Island Arsenal followed, and then he spent two years as Inspector of Ordnance at the Bethlehem Steel Plant in Eastern Pennsylvania. As a Major, Williams served four years from December 1907 until January 1912 as a member of the Joint Army-Navy Board to Formulate Specifications for Gun Forgings, followed by six months in 1912 inspecting ordnance materiel in England. Returning to the United States as the commanding officer at Watertown Arsenal, he again traveled to Europe at the end of 1914 as American Military Observer with the German Army for six months. Now, a Lieutenant Colonel, he again took up duties with the Joint Gun Forgings Board from May 1915 until June 1916. Following eight months as the Ordnance Officer for the Southern Department of the Army during the mobilization of Regular Army and National Guard units for the Punitive Expedition, he was called to Washington at the end of February 1917, to become Assistant Chief of Ordnance. With American entry into World War I in April 1917, he traveled to France as the Chief Ordnance Officer for the American Expeditionary Forces. Williams spent eleven months there, during which time he was advanced two grades to the rank of Brigadier General. On April 30, 1918, Williams became the acting Chief of Ordnance, while the current Chief of Ordnance Major General William Crozier was on special duty for President Woodrow Wilson. On July 16, 1918, he was promoted to Major General and official appointed as the 12th Chief of Ordnance, a post he would hold until 1930. During the closing months of World War I, he improved the organization of the Ordnance Department to increase efficiency and decentralize the procurement process to avoid delays. In contrast with the control that the Ordnance Department had over the development and utilization of weapons prior to World War I, he strongly believed that the combat arms should help determine the kinds of weapons they wanted to use in future conflicts. His postwar reorganization of the Ordnance Department realigned responsibilities into a logical scheme which served as the pattern for Ordnance Department operations until American entry into World War II. Williams encouraged planning for industrial mobilization in a period when budgets were comparatively small and placed considerable emphasis on the partnership between the arsenals and industry. Despite shortages of appropriations and personnel, departmental morale was maintained at a high level. He oversaw improvements in coast defense armament and ammunition, and directed that work begin on a semiautomatic rifle, which would prove so beneficial in World War II. Williams retired on April 1, 1930. However, during World War II, he returned to active duty in January 1942 to serve as an assistant to the Chief of Ordnance. In July 1942, he became the War Department representative to the National Defense Research Committee, where he remained until he was relieved from active duty in September 1943. Upon retirement, Williams lived in South Hamilton, Massachusetts. He died on June 11, 1958 and is buried at Arlington National Cemetery.