Born in Springfield, Ohio to Orson Williams and Pamela Floyd, he graduated from the U.S. Naval Academy in 1884 and was ordered to the sloop , flagship of the Pacific Squadron. He then served aboard the Coast Survey schooner "Eagre" from 1886 to 1887, aboard the sloop patrolling the Gulf of Saint Lawrence from 1887 to 1889, and as instructor in mathematics at the U.S. Naval Academy from 1889 to 1893. From 1893 to 1896, he served as watch officer aboard the protected cruiser , which protected American interests and shipping in South America during the Brazilian Revolution and evacuated missionaries from the coast of China during the Sino-Japanese War. He returned to the Academy as an instructor of higher mathematics from 1896 to 1898.