William Mahone worked as a teacher at Rappahannock Academy in Caroline County, Virginia beginning in 1848, but was actively seeking entry into civil engineering. He did some work helping locate the Orange and Alexandria Railroad, an 88 mile line between Gordonsville, Virginia and the City of Alexandria. Having performed well with the new railroad, he was hired to build a plank road between Fredericksburg and Gordonsville.
In 1853, he was hired by Dr. Francis Mallory of Norfolk, as chief engineer to build the new Norfolk and Petersburg Railroad. Mahone's innovative 12 mile-long roadbed through the Great Dismal Swamp between South Norfolk and Suffolk employed a log foundation laid a right angles beneath the surface of the swamp. Still in use 150 years later, Mahone's corduroy design withstands immense tonnages of modern coal traffic. He was also responsible for engineering and building the famous 52 mile-long tangent track between Suffolk and Petersburg. With no curves, it is a major artery of modern Norfolk Southern rail traffic.
In 1854, Mahone surveyed and laid out the streets and lots of Ocean View City, a new resort town fronting on the Chesapeake Bay in Norfolk County, Virginia. With the advent of electric streetcars in the late 19th century, an amusement park was developed there and a boardwalk was built along the adjacent beach area. Most of Mahone's street plan is still in use in the 21st century as Ocean View, now a section of the City of Norfolk.
On February 8, 1855, Mahone married Otelia Butler (1835-1911), the daughter of Otelia Voinard Butler (1803-1855), originally from Petersburg, Virginia and the late Dr. Robert Butler from Smithfield. Dr. Butler was the Treasurer of the Commonwealth of Virginia from 1846 until his death in 1853. Young Otelia is said to have been a cultured lady. She and William settled in Norfolk where they lived for most of the years before the War for Southern Independence. They had 13 children, but only 3 survived to adulthood, two sons, William, Jr. and Robert, and a daughter, also named Otelia.
The Mahone family escaped the yellow fever epidemic that broke out in the summer of 1855 and killed almost one-third of the populations of Norfolk and Portsmouth by staying with his mother some distance away in Jerusalem. However, as a consequence of the epidemic, the decimated citizenry of the Norfolk area had difficulty in meeting financial obligations and work on their new railroad to Petersburg almost came to a standstill. Ever frugal, Mahone and his mentor, Dr. Mallory, nevertheless pushed the project to completion.
Popular legend has it that Otelia and William Mahone traveled along the newly completed railroad naming stations from Ivanhoe and other books she was reading written by Sir Walter Scott. From his historical Scottish novels, they chose the station names of Windsor, Waverly and Wakefield, and tapped the Scottish Clan "McIvor" for the name of Ivor, a small Southampton County town. When they reached a location where they could not agree, it is said that the name Disputanta was created. The Norfolk and Petersburg Railroad was completed in 1858, and Mahone was named its president a short time later.
According to some records, in 1860, Mahone owned 7 slaves: 3 males (ages 13, 4 and 2) and 4 females (ages 45, 24, 11 and 1). Nevertheless, subsequent to the War Mahone showed empathy for African-American soldiers and former slaves, which was atypical for the times, and worked diligently for their fair treatment and education (see ‘After the War’ Section).