- Born in North Carolina.
- Appointed from North Carolina.
- Resigned as lieutenant, US Navy, 2 May 1861.
- Served in Virginia Navy.
- Lieutenant, CS Navy, 11 June 1861.
James W. Cooke served in the pre-war navy, rising to the rank of lieutenant before resigning in May of 1861. He commanded the CSS Weldon N. Edwards beginning 27 July 1861. On 30 October1861, Cooke became commander of the CSS Ellis. He commanded the CSS Ellis during the battle of Roanoke Island (7-8 February 1862) and Elizabeth City (10 February 1862). He was shot in the arm and stabbed in the leg with a bayonet during the boarding of the Ellis by the USS Ceres. He was captured during this action and on 12 February 1862 he was paroled.
Cooke was promoted to commander in June of 1862. He oversaw the construction of the ram CSS Albemarle, completing her in April of 1864. He commanded her during the battles of Plymouth (19 April 1864) and Albemarle Sound (5 May 1864). He was promoted to captain and placed in charge of the Confederate naval forces in North Carolina waters in June of 1864, a position he held for the rest of the war.