Shepard was born in Oswego, New York. On November 24, 1859 he received an appointment to the United States Naval Academy, from where graduated in 1861 at the start of the Civil War. He was assigned to the sloop-of-war, and served on the West Gulf Blockading Squadron from 1861 to 1862. On November 22, 1862 he was promoted to ensign and assigned to the sidewheel steamer and continued to serve on the blockading squadron until 1863. He served on the ironclad gunboat and was on board this ship during the siege of Port Hudson. Shepard received a letter of commendation from General Richard Arnold, who was General Nathaniel P. Banks' Chief of Artillery, after he had served on shore with a naval battery for several weeks. Shepard served on the monitor during the siege ofCharleston, South Carolina, then on the steam sloop during the capture of the Confederate privateer on October 7, 1864. He was commissioned as a lieutenant on February 22, 1864. After the capture of Florida Shepard served on the steamer and the monitor before being assigned to the steamer, part of the North Atlantic Squadron. He then served on the apprentice-ship from 1868 to 1869. Shepard served on several other ships before being promoted to commander on 9 May 1878. From 1878 to 1881 he was at the Naval Academy, and immediately after from 1879 to 1881 commanded the, and then in 1882. From 1882-1886 Shepard was the Superintendent of the New York Nautical School on board the sloop-of-war. He was then assigned to the Philadelphia Naval Asylum. In May 1889, he was given the command of the. From the Kearsarge he went to the, which was with the Pacific Squadron, remaining there from February 1890 to August 1891. After that service he was made Lighthouse Inspector until his promotion to Captain in May 1893, when he was detailed as equipment officer of the New York Navy Yard for four months. He then commanded from August 1893 to November 1894, then until July 1897, and finally the receiving ship through April 1898. Afterwards, he again served as a lighthouse inspector until 1901. Shepard was promoted to captain on May 15, 1893, and to rear admiral on March 3, 1901. In 1901, Shepard became the first flag officer to become a student at the Naval War College. Shepard retired on June 13, 1902 on his own request. He died on August 17, 1904, of heart disease, and was buried at Arlington National Cemetery. He was married to Alice Stevens Shepard, who died in 1915 and was buried next to her husband.