Western North Carolina Railroad; and from 1848 to 1855 he was the chief engineer of the Wilmington & Manchester Railroad. He was also chief engineer of the Blue Ridge Rail Road Company in South Carolina in the 1850s. Gwynn's concurrent positions with multiple railroads was considered controversial and was criticized at times, but his qualifications and accomplishments overshadowed such criticism. But by the late 1850s, he had established an international reputation as a railroad engineer and as a founder of the southeastern railroad network. A colleague said that Gwynn "made for himself a reputation among his fellow engineers that will last for all time." In 1857, he retired from railroad work and moved to South Carolina. Confederate States Military At the start of the Civil War, Gwynn was a major in the engineers of the South Carolina Militia. At the request of the governor, he had accepted the commission and was instrumental in the planning of the attack on Fort Sumter in early 1861 as a member of the Ordnance Board. He was later charged with constructing batteries at various strategic points in Charleston Harbor, facing Fort Sumter. On April 10, 1861, he accepted a commission as major general of the Virginia Militia and was directed by Virginia governor John Letcher to assume command of the defenses around Norfolk and Portsmouth until mid-May. Working with Gwynn at Norfolk was William Mahone, who was the president of the Norfolk and Petersburg Railroad. Working under Gwynn's authority, Mahone (who was still a civilian) helped bluff the Federal troops into abandoning the Gosport Shipyard in Portsmouth by running a single passenger train into Norfolk with great noise and whistle-blowing, then much more quietly, sending it back west, and then returning the same train again, creating the illusion of large numbers of arriving troops to the Federals listening in Portsmouth across the Elizabeth River (and just barely out of sight). The ruse worked, and not a single Confederate soldier was lost as the Union authorities abandoned the area, and retreated to Fort Monroe across Hampton Roads. In 1861, Gwynn oversaw construction of defensive fortifications at Sewell's Point, which was across the mouth of Hampton Roads from Fort Monroe at Old Point Comfort. He also participated in the Battle of Big Bethel during the Blockade of the Chesapeake Bay. Gwynn also served as a brigadier general in the Virginia Provisional Army and then brigadier general