The newly promoted Colonel Lamb assumed command of Fort Fisher on the 4th of July 1862. Although not trained as an engineer he spent most of the next two years working successfully to build the fort into the Confederacy's largest bastion. Recognizing its critical strategic value to the Confederacy, he successfully defended the fort against a Union attack led by Benjamin Butler in December 1864. In January 1865 Alfred Terry led a renewed attack against the fort and despite a heroic defense by Lamb and his garrison the fort was captured and Lamb was grievously wounded. He eventually recovered, becoming from 1880 to 1886 the mayor of Norfolk, Virginia as his father and grandfather had been before him. Initially a member of the Democratic Party, he joined the Republican Party in 1882. In 1900 he was made a Knight of the Order of Vasa, for his services as consul for Sweden and Norway. He died in Norfolk on 23 March 1909 and is buried there in Elmwood Cemetery. His personal papers are held by the Special Collections Research Center at the College of William & Mary.