During his early youth, Denby's father, a Virginia ship-owner and interested in European trade, was appointed to a post at Marseilles, France. His functions there were similar to those of a consul-general, but the post was then known as Naval Agent of the United States. On taking up his post, Nathaniel Denby took his son with him, where attended the College Royal at Marseilles and became fluent in the French language. Denby later attended Georgetown College, Washington, D.C., and the Virginia Military Institute, from which he graduated with high honors in 1850.