In 1864, he became the executive officer of the monitor Patapsco of the South Atlantic Blockading Station and engaged in sweeping torpedoes off Charleston. He survived the loss of that ironclad on 15 January 1865, when she struck a torpedo, exploded, and sank with a loss of 75 lives. Following duty in the steam frigate, Colorado, on the European Station, another tour as instructor at the Naval Academy, and in the Bureau of Navigation of the Navy Department, he served in the screw sloop, Congress. He then commanded Alert, practice ship Mayflower and Swatara while on duty at the Naval Academy.
During the next years, he was Assistant to the Superintendent of the Naval Observatory, then Officer-in-Charge of the Naval Torpedo Station, Newport, R.I. On 9 September 1886, he became Superintendent of the Naval Academy. He was promoted to Captain on 9 April 1889, reported to the Mare Island Navy Yard to fit out San Francisco, and assumed command when that protected cruiser was commissioned on 15 November 1889. He was detached in June 1892 to serve as Inspector of Ordnance in the Washington Navy Yard and was appointed Chief of the Bureau of Ordnance on 28 January 1893. He assumed command of battleship, Iowa, on 15 June 1897.
On 17 February 1898, he was made President of the Board of Inquiry to investigate the destruction of battleship, Maine. On 26 March 1898, he assumed command of the North Atlantic Station, with the temporary rank of Rear Admiral. The United States declared war against Spain on 21 April 1898; and, eight days later, Admiral Cervera’s fleet sailed from the Cape Verde Islands for an uncertain destination. Admiral Sampson, in flagship New York, put to sea from Key West in search of the Spanish Fleet and established a close and efficient blockade on that fleet in the harbor of Santiago on 1 June 1898.
On the morning of 3 July 1898, Cervera’s fleet came out of the harbor and was completely destroyed in a running sea battle lasting five hours. The next day, Rear Admiral Sampson sent his famous message: “The Fleet under my command offers the nation as a Fourth of July present, the whole of Cervera’s Fleet!” He was appointed Cuban Commissioner on 20 August 1898 but resumed command of the North Atlantic Fleet in December. He became Commandant of the Boston Navy Yard in October 1899 and transferred to the Retired List on 9 February 1902.
Rear Admiral Sampson died at Washington, D.C., on 6 May 1902. He is buried in Arlington National Cemetery.