[From Wikipedia]:
Though living in Norfolk, Virginia prior to the American Civil War, Farragut made it clear to all who knew him that he regarded secession as treason. Just before the war's outbreak, Farragut moved with his Virginian-born wife to Hastings-on-Hudson, a small town just outside New York City.
He offered his services to the Union, and was initially given a seat on the Naval Retirement Board. Offered a command by his foster brother, David Dixon Porter, for a special assignment, he hesitated upon learning the target might be Norfolk. As he had friends and relatives living there, he was relieved to learn the target was changed to his former childhood home of New Orleans. The navy had some doubts about Farragut's loyalty to the Union because of his Southern birth as well as that of his wife. Porter argued on his behalf, and Farragut was accepted for the major role of attacking New Orleans.
Farragut was appointed under secret instructions on February 3, 1862, to command the Gulf Blockading Squadron, sailing from Hampton Roads on the screw steamer USS Hartford, bearing 25 guns, which he made his flagship, accompanied by a fleet of 17 ships. He reached the mouth of the Mississippi River, near Confederate forts St. Philip and Jackson, situated opposite one another along the banks of the river, with a combined armament of more than 100 heavy guns and a complement of 700 men. Now aware of Farragut's approach, the Confederates had amassed a fleet of 16 gunboats just outside New Orleans.
On April 18, Farragut ordered the mortar boats, under the command of Porter, to commence bombardment on the two forts, inflicting considerable damage, but not enough to compel the Confederates to surrender. After two days of heavy bombardment, Farragut ran past forts Jackson and St. Philip and the Chalmette batteries to take the city and port of New Orleans on April 29, a decisive event in the war.
Congress honored him by creating the rank of rear admiral on July 16, 1862, a rank never before used in the U.S. Navy. Before this time, the American Navy had resisted the rank of admiral, preferring the term "flag officer", to distinguish the rank from the traditions of the European navies.
Later that year, Farragut passed the batteries defending Vicksburg, Mississippi, but had no success there. A makeshift Confederate ironclad forced his flotilla of 38 ships to withdraw in July 1862.