Hoff was acting sailing master at the New York Navy Yard in Brooklyn, New York, from 1828 to 1831 and was promoted to passed midshipman on 23 March 1829 and to lieutenant on 3 March 1831. In June 1831 he reported aboard the frigate USS Potomac and took part in the First Sumatran Expedition of 6–9 February 1832, a punitive expedition against the Chiefdom of Quallah Battoo (Kuala Batee, Aceh Barat Daya, Districts of Aceh, Aceh Sultanate) mounted as a reprisal for the massacre there a year earlier of the crew of the merchant shipFriendship. Potomac bombarded the settlement. Hoff, as part of a division of bluejackets and marines put ashore under the command of her executive officer, Lieutenant Irvine Shubrick. In the Battle of Quallah Battoo, the landing force captured two forts and killed the chiefdom's leader, RajaPo Muhammad, and eleven other Sumatrans in exchange for six Americans badly wounded. The expedition made Sumatran waters safe for American shipping for the following six years.[2][3]
Shortly after the American Civil War broke out in April 1861, Hoff was promoted to captain on 30 June 1861. He commanded the steam sloop-of-warUSS Lancaster in the Pacific Squadron from 1861 to 1862. Promoted to commodore on 16 July 1862, Hoff returned to the United States in 1862 and was on special duty in 1863, and after that performed ordnance duty in Philadelphia through the end of the war in April 1865 and thereafter until 1867.[7][8]
Hoff was promoted to rear admiral on 13 April 1867, and commanded the North Atlantic Squadron from October 1867 to October 1869. During his tour in command of the squadron, he dealt with many sensitive issues, including troubles in Cuba, at the time a colony of Spain, where the Ten Years' War broke out in October 1868. He promptly and energetically intervened in the conflict to protect resident American citizens from the actions of Spanish officials.[9][10]
Hoff was placed on the retired list on 19 September 1868, but continued to serve the Navy after that. Returning to the United States in August 1869, he became a member of the Naval Retiring Board in October 1869, and, while serving in the capacity, was also president of the Board of Visitors at the United States Naval Academy in Annapolis, Maryland, handling examinations for the Class of 1870.[11][12]
On November 13, 1838, Hoff married Louisa A. W. Bainbridge, a daughter of Commodore William Bainbridge.[15] Their son, William Bainbridge-Hoff, born in 1846, rose to the rank of captain in the U.S. Navy and authored several influential books on naval tactics.[16][17]