The first military submarine that sank an enemy ship was U.S. Navy named H. L. Hunley. It was in 1864 during the American Civil War. However, after a successful attack, it also sank to the bottom, possibly because it was too close to its own exploding torpedo. Still, H. L. Hunley left a mark in history, demonstrating both advantages and danger of U-boat warfare.

More Info: en.wikipedia.org