After Virginia seceded from the United States on 17 April 17, 1861, he resigned from the United States Navy on 21 April. Lynch was initially appointed captain in the Virginia Navy and when Virginia joined the Confederate States of America and merged its military, he became a captain in the Confederate States Navy on 10 June 1861. He commanded naval batteries at Aquia Creek, Virginia, during their shelling by Union gunboats in May 1861; was in charge of gunboats and the defense of Roanoke Island, North Carolina in February 1862; and led Confederate naval forces at Vicksburg, Mississippi from March to October 1862. He was also assigned to the Department of the Navy offices as the Chief of the Bureau of Orders and Details during 1862.