In 1862 Townsend was Acting Lieutenant of the USS Miami under the command of Abram Davis Harrell. The Miami was a side-wheel, double-ender gunboat with a crew of 134 and armament of one 80 pounder Parrott rifle one 9 inch smoothbore, and four 24 pounder cannon. The ship participated under Admiral David Farragut as part of the Mortar Flotilla in neutralizing Confederate forts below New Orleans. Eliminating the forts permitted the Union ships to move upriver and eventually take New Orleans. Townsend became Commander of the Miami by October of that year.