Born in New York City in 1806, Howard Stansbury was trained as a civil engineer. He married Helen Moody of Detroit on 1 September 1827. The couple had two children, a daughter and a son, the latter going on to West Point and serving in the Civil War. In October 1828 Stansbury secured a position with the United States Topographical Bureau as a civil engineer, and for the next ten years was employed as a surveyor and supervisor of various public works in the Midwest and along the Atlantic Coast.
On 7 July 1838 Stansbury was granted a commission as a first lieutenant in the newly formed Army Corps of Topographical Engineers and was advanced to captain in 1840. From 1838 to 1849 he directed projects for the corps in the Great Lakes region, at Portsmouth, New Hampshire, and, during the Mexican War, at some fortifications in the Dry Tortugas in the Gulf of Mexico.