The son of merchant D. W. and Elizabeth Bagley, William grew up in Williamston, NC, and was known as Bud in the family. He entered the University in 1843 as an "irregular" or non-degree-seeking student. A member of the Philanthropic Society, William left Chapel Hill in 1845 and became a clerk in his father's store in Williamston, NC. By late 1849 he had opened a general mercantile in Plymouth, NC, with his brother-in-law Henry B. Short, who married Bagley's sister Marietta.