Denby was born in Mount Joy in Botetourt County, Virginia to Nathaniel Denby and Sarah Jane Harvey. Denby's maternal grandfather, Mathew Harvey, was a soldier in Lee's Legion during the American Revolutionary War. Denby received his early education at the Tom Fox Academy, Hanover County, Virginia. 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. After graduating, Denby went to Selma, Alabama, where he taught school for three years. In 1853, he removed to Evansville, Indiana, which remained his home until his death. Evansville was then a town of six thousand inhabitants, which, from its position on the Ohio River, at the terminus of the Wabash and Erie Canal, seemed destined to a great development. At Evansville, Denby devoted himself to the study of law and to newspaper work. He represented his county in the Indiana House of Representatives during the session of 1856-57. While in the legislature, Mr. Denby became acquainted with Martha Fitch, daughter of U.S. Senator Graham N. Fitch, of Indiana, and they were afterward married.
Military service
With the attack on Fort Sumter marking the outbreak of the American Civil War, Denby raised a company of volunteer soldiers and guarded the powder magazine near Evansville, Indiana. On September 12, 1861, Denby was commissioned as the Lieutenant Colonel of the 42nd Indiana Volunteer Infantry Regiment and mustered in at that rank on October 10, 1861. On October 1, 1862, Indiana Governor Oliver P. Morton commissioned Denby as Colonel of the newly formed 80th Indiana Volunteer Infantry Regiment. Denby was not mustered in at his new rank until October 21, 1862, so he was still serving with the 42nd Indiana when it took part in the Battle of Perryville Kentucky on October 8, 1862. It was there that Denby was twice wounded and had his horse killed under him. Colonel Denby officially took command of the 80th Indiana on or before November 22, 1862. In a letter to the army dated January 12, 1863, Colonel Denby resigned his commission, stating: I suffer habitually in riding with a very severe cramp in my left leg - walking affords no relief. The cramp is caused by an accident which happened many years ago and the side effects whereof were scarcely felt by me until after I entered the service. I have consulted various medical advisors who uniformly say there can be no remedy. I have therefore no recourse left but to return to a sedentary life. His resignation was accepted effective January 17, 1863, and he left the army based on a surgeon's certificate of disability.
Political career
After resignation, he resumed the practice of law in Evansville. Denby was active in the Democratic Party, and upon the election of Grover Cleveland as President, he was put forward for a post in the diplomatic service and on May 29, 1885, he was appointed Minister to China. Denby remained at the post through 1898—the United States' longest serving envoy to China to date—through the administrations of Cleveland's first term, RepublicanBenjamin Harrison, Cleveland's second term. He resigned a little more than a year into the administration of Republican William McKinley, and would be succeeded by Edwin H. Conger. Upon his return to the U.S. in September 1898, Denby was appointed a member of the commission to inquire into the conduct of the Spanish–American War. Even before the adjournment of that commission, he was made a member of the first commission to the Philippines, together with Admiral George Dewey, General Elwell Stephen Otis, Jacob Gould Schurman, the President of Cornell University, and Professor Dean Conant Worcester, of the University of Michigan.
Later life
After retirement from official life, Denby settled down at his old home at Evansville, Indiana, and devoted himself to literary labors, study, and the pleasures of home life. He died suddenly of heart failure, at the age of seventy-four years, at Jamestown, New York, to which city he had gone to deliver a lecture.