It was established in 1640, when Duke Wilhelm von Saxe-Weimar created a subdivision for his younger brother Ernest I the Pious. Duke Ernest took his residence at Gotha, where he had Schloss Friedenstein built between 1643 and 1654. At the same time, the Duchy of Saxe-Eisenach was created for the third brother Albert IV.
Nevertheless Albert died in 1644, and Ernest inherited large parts of his duchy, though not the core territory around the residence at Eisenach and the Wartburg, which fell to his elder brother Wilhelm of Saxe-Weimar. Ernest could also incorporate several remaining estates of the extinct House of Henneberg in 1660, which had been vacant since 1583. Finally in 1672 he received the major part of Saxe-Altenburg through his wife Elisabeth Sophie, after Altenburg's last duke Frederick William III had died without heirs. Ernest would then be called Duke of Saxe-Gotha-Altenburg.
When Ernest died in 1675, he left his seven sons a significantly enlarged territory. The eldest, Frederick I at first ruled jointly with his brothers until in 1680 the duchy was divided. The area around Gotha and also Altenburg passed to Frederick I, who retained the title of a Duke of Saxe-Gotha-Altenburg. For later history of the duchy, see Saxe-Gotha-Altenburg.