When, precisely, the fortress of Aarburg was constructed on the rocky outcropping is unknown. The first time it was documented was in 1123 when it is mentioned as "Areburc". At the time it was the property of the Grafen von Frohburg family. From this castle the Bailiwick of Aarburg was governed, what is today the western part of the county of Zofingen, though not the town of Zofigen itself. In 1299 the Frohburgs sold the castle and the Bailiwick of Aarburg to the Habsburg family. The settlement at the foot of the castle was clearly identified as a town in the year 1330. Archeological evidence has shown that the town was probably founded around the year 1312.