He was a member of the Catholic Koháry line of the Saxe-Coburg and Gotha-Koháry and an elder brother of Ferdinand, tsar of Bulgaria. In 1870, he became a Major in the Hungarian army . He was a close confidant to his brother-in-law, Crown Prince Rudolf . 
Two years later, he became Duke of Saxe-Coburg and Gotha when his father died. Ernest supported the German Confederation in the Schleswig-Holstein Wars against Denmark, sending thousands of troops and becoming the commander of a German corps; he was instrumental in the 1849 victory at the battle of Eckernförde against Danish forces.