Though he was born in Tennessee, Hunley's parents (Louisa Harden Lawson and John Hunley) relocated to New Orleans. Hunley served in the Louisiana State Legislature and practiced law in New Orleans. In 1861, after the start of the American Civil War, Hunley joined James R. McClintock and Baxter Watson in building the submarine Pioneer. In order to prevent her capture, she had to be scuttled when New Orleans fell to Union forces in early 1862.

After an unsuccessful attempt at building another submarine with McClintock and Watson, which ended in the vessel's sinking in Mobile Bay, Alabama, Hunley funded by himself a third submarine. The first submarine could supposedly reach 4 knots.

Five men from the first crew of H. L. Hunley died during early tests when she was accidentally swamped by the wake of a passing ship through her open hatches; four managed to escape. A second crew was recruited in Charleston.

On October 15, 1863, though he was not part of the crew, Hunley decided to take command during a routine exercise. The vessel again sank, and this time all eight crew members were killed, including Hunley himself. The vessel was later raised and used again in 1864 in the first successful sinking of an enemy vessel (the USS Housatonic) by a submarine in naval history, but the submarine soon sank too.