The second USS Portsmouth was a wooden sloop-of-war in the United States Navy in service during the mid-to-late 19th century. She was designed by Josiah Barker and built in Portsmouth, New Hampshire, on the lines of a French-built privateer. She was described as an improvement over the USS Saratoga built in the same shipyard a year earlier. The Portsmouth was launched at the Portsmouth Navy Yard on 23 October 1843 and commissioned on 10 November 1844, with Commander John Berrien Montgomery in command.
The Portsmouth was an important ship during the Mexican-American War, when her crew liberated the town of Yerba Buena, whose name was changed to San Francisco in 1847. She set sail on 25 January 1845 from Norfolk, Virginia, on a cruise around Cape Horn to join the Pacific Squadron under the command of Commodore John D. Sloat. En route, she made stops in Rio de Janeiro, Valparaiso, Callao, the Sandwich Islands, and Acapulco. To prevent the possibility of Great Britain acquiring California, she was initially engaged in protecting San Francisco Bay by watching the movements of British vessels off the California coast. After the declaration of war with Mexico, a detachment of Marines under the command of Second Lieutenant Henry Bulls Watson rowed ashore and raised the American flag over Yerba Buena on 9 July 1846, seizing California for the United States. The plaza where this occurred in San Francisco is now called Portsmouth Square in honor of the Portsmouth and is located in Chinatown. The Portsmouth remained in San Francisco Bay until November 1846 when she was sent to San Diego. During 1847, the Portsmouth was assigned to blockade Mexico's west coast. On the morning of 3 January 1848, the Portsmouth finally got underway for the cruise back to the United States east coast.
Returning to Boston in May 1848 she departed again on 29 August and sailed east to the African coast. There until 1 February 1849 she patrolled with Royal Navy ships to suppress the slave trade. Between September 1849 and May 1851 she again cruised off the West African coast, returning to Boston on 26 June.