As Union naval officer, "Captain Mercer" remained loyal to the Union during the war of the rebellion and was in command of the Union warship stationed in Charleston Harbor at the outbreak of the American Civil War. He led a squad of four ships that had been sent to relieve the garrison at Fort Sumter, but arrived too late. On 16 May 1861 he took command of the newly recommissioned in the Northern Blockading Squadron, and participated in the Army-Navy action against Cape Hatteras, North Carolina.