Leonard attended the public schools and was later graduated from Phillips Exeter Academy, Exeter, New Hampshire in 1863 and then earned a law degree from Harvard University in 1867.
He was the grandnephew of John Edwards (Pennsylvania) who also served in Congress. He studied law in Germany before he returned to the United States and was admitted to the bar in Louisiana in 1870 and commenced practice at Monroe, Louisiana. Leonard was the district attorney of the thirteenth judicial district of Louisiana in 1871 and 1872.
He was elected associate justice of the Louisiana Supreme Court in 1876 before he resumed the practice of his profession in Monroe, Louisiana.
He was elected as a Republican to the Forty-fifth Congress and served from March 4, 1877, until his death in Havana, Cuba, while vacationing with several other Washington leaders on March 15, 1878.