Refitted for service in 1838, Ohio sailed on 16 October 1838 to join the Mediterranean Squadron under Commodore Isaac Hull.
To meet the needs of the Mexican–American War, Ohio was recommissioned on 7 December 1846, and sailed on 4 January 1847 for the Gulf of Mexico, arriving off Veracruz on 22 March.
Men from Ohio retrieved the guns of brig Truxtun, which had foundered in a storm near Tuxpan on 16 September 1846.
On 26 June, she sailed to bolster the Pacific Squadron, first carrying the U.S. minister to Brazil and operating off the east coast of South America until December.
Thomas ap Catesby Jones took her as the flagship of the Pacific Squadron, intending to blockade the western Mexico ports.
Jones used the fleet to help transport to Monterey, California, those that had aided the United States in the war, arriving there on 9 October.
Ohio spent the next two years in the Pacific protecting commerce and policing the newly acquired California Territory during the chaotic early months of the gold rush.
Scurvy struck the crew in the spring of 1849 in San Francisco Bay, so Jones sent Ohio to the Sandwich Islands for fresh food.