Moseley graduated from the University of North Carolina at Chapel Hill in 1818. He was of entirely English ancestry, all of which had been in America since the days of the original thirteen colonies. He received his master's degree from UNC in 1821. While at the university, Moseley was the roommate of future president James K. Polk.