 Ely attended Day’s Academy and graduated from Brown University in 1859.He studied law, was admitted to the bar and commenced practice at Dedham.He was a trial justice, was elected a member of the Massachusetts House of Representatives, and served in the Massachusetts State Senate.