Carpenter was born in Leyden, Massachusetts, on February 27, 1834, the son of David N. Carpenter and the former Maria P. Newcomb. Appointed a midshipman from Massachusetts on October 1, 1850, he was attached to the sloop-of-war in the Pacific Squadron from 1851 to 1855. He attended the United States Naval Academy in Annapolis, Maryland, from 1855 to 1856 and, upon completing his studies, was promoted to passed midshipman on June 20, 1856. Carpenter was in the Home Squadron and in special service between 1856 and 1858, serving consecutively aboard the steam frigates,, and and the brig ; he was aboard Dolphin on August 21, 1858 when she captured a slave ship, the brig Echo, with 300 African slaves on board. He was promoted to lieutenant on January 23, 1858. Carpenters next duty was aboard a receiving ship at Boston, Massachusetts, in 1858 and 1859, and he was promoted to master on January 22, 1858 and to lieutenant the next day. He reported for duty aboard the screwsteamer in 1859. Mohawk cruised off the coast of Cuba in 1859 and 1860 and captured the slave shipWildfire on April 20, 1860, freeing 530 African slaves. She later guarded Naval Station Key West, in Key West, Florida, from armed groups seeking to seize it from the United States Government in the months prior to the outbreak of the American Civil War.
After service aboard the flagship of the Asiatic Squadron, the screw sloop-of-war, from 1866 to 1867, Carpenter became commanding officer of the screw sloop-of-war in the same squadron in 1868. He then performed duty at the Portsmouth Navy Yard in Kittery, Maine, from 1868 to 1870 and was promoted to commander on February 10, 1869. After another short assignment at the Portsmouth Navy Yard in 1871, he returned to sea as commanding officer of the screw steamer in the North Atlantic Squadron from 1871 to 1872. He was back at the Portsmouth Navy Yard from 1872 to 1875 on equipment duty. Carpenter was commanding officer of the gunboat in the North Atlantic Squadron from 1875 to 1876, before another tour at the Portsmouth Navy Yard in 1878. Promoted to captain on March 25, 1880, Carpenter was on equipment duty at the Boston Navy Yard in Boston, Massachusetts, from 1880 to 1882, then returned to USS Hartford as her commanding officer from 1882 to 1884; during his tour, Hartford carried a team of American and British scientists from Callao, Peru, to the Caroline Islands in the Pacific Ocean to observe the total solar eclipse of May 6, 1883. He commanded the receiving ship at the Boston Navy Yard from 1888 to June 1890 Carpenter was commandant of the Portsmouth Navy Yard from June 1890 to January 15, 1894, and was promoted to commodore on May 15, 1893. He became commander of the Asiatic Squadron on September 1, 1894 and was promoted to rear admiral on November 11, 1894; the First Sino-Japanese War was a major concern of his tour as squadron commander.
Retirement
Carpenter relinquished command of the Asiatic Squadron on December 21, 1895 and retired from the Navy upon reaching the mandatory retirement age of 62 on February 28, 1896. He resided in Portsmouth, New Hampshire, during his retirement.
Recall to active duty
Carpenter was recalled to active duty during the Spanish–American War of 1898, returning to the Portsmouth Navy Yard to serve as its commandant from April to August 1898. He then returned to retirement.
Death
Carpenter had begun to suffer from severe nervous disorders during the final years of his naval career and sought medical treatment soon after his retirement. His condition improved, but around mid-February 1899 his health went into decline again, and he spent six weeks in the Adams Nervine Asylum in the Jamaica Plain neighborhood of Boston, Massachusetts, for treatment. Although his condition again showed signs of improvement, he committed suicide at the asylum by shooting himself in the head on the morning of April 1, 1899. He was survived by his wife, three sons, and two daughters. Carpenter is buried at Proprietors Burying Ground in Portsmouth, New Hampshire.