The Stableyard and Koldinghus date from the same period. They are both parts of the castle that was built on the border between Jutland and Schleswig, probably in the year 1268.
The main castle building was situated where Koldinghus stands today, while the Stableyard was located in a lower position, bordered to the east and south by a moat. The area toward the north, where the castle lake is now located, used to be a large area of swampy land, which provided effective protection against attacks from the north. Nothing is known about the buildings that stood on the bank between the moat and this swampy area.
It is certain, however, that from the middle of the sixteenth century, these buildings housed the royal stables. At that time, the stables were housed in half-timbered buildings, which were replaced during the seventeenth century by the brick buildings that are still standing today. During the reign of King Christian IV, solid tower-like pavilions stood in the two corners facing east. These were later removed, but remains of the thick tower walls can still be seen in the partitions between the offices.
After the Swedish Wars of 1657–60, the decision was made to fortify Koldinghus castle and stableyard, which were provided with a number of bastion-like installations. It is possible that these were never fully completed, but they were in any case demolished a few years later.
In 1717–18, King Frederik IV had the Stableyard equipped so that it could be used by the cavalry. King Christian V, before him, had already divided the royal estates into cavalry districts, whose task it was to supply horsemen in case of war. King Frederik IV expanded this system and improved its efficiency, so the stableyard served as the base for the Koldinghus cavalry district over the century that followed.
During the England Wars of 1808–14, the large buildings were used as storage space for military equipment and materials. The fire in the castle on the night between 29 and 30 March 1808 did not reach the Stableyard.