The castle was built on a steep rock in the 11th century. It was a royal castle, under which a town gradually developed. The mighty fortifications are the result of the gradual improvement of the important border fortress and later county seat of Trenčín. The castle played an important role in the history of the Kingdom of Hungary, especially during the Turkish invasions.
Matúš Čák (Máté Csák) came into possession of the castle in 1302 and ruled virtually all of western and central Slovakia from here until his death in 1321. After his death, the castle became royal property again. His father, Peter Csák, had the 39 m high central tower rebuilt between 1260 and 1270.
On August 24, 1335, the Treaty of Trenčín was concluded at Trenčín Castle. The contracting parties were the Bohemian King John of Luxembourg and his son Charles IV, as well as the Polish King Casimir the Great. Casimir's brother-in-law, the Hungarian King Charles of Anjou, acted as mediator in the treaty negotiations. With the treaty, Casimir the Great gave up all of Poland's claims to the Silesian duchies dominated by the Piasts. In return, John of Luxembourg and his son Charles renounced the Polish royal title that they had inherited from the Přemyslids.
Also at Trenčín Castle, Casimir's successor Louis I, in his capacity as King of Poland, confirmed the Trenčín Declaration of Renunciation of 1335 in full in 1372.
Over time, other buildings were added to the sturdy Matthew Tower: the Mill Tower, the Jeremiah Tower, the Louis Palace, the Barbara Palace and the Zápoly Palace. The Barbara Palace, which is characteristic of the castle today, was built by King Sigismund of Luxembourg for his second wife Barbara.
In 1600, the Illésházy family became the owners of the castle. A German garrison settled in the castle from 1663 to 1782. In 1742, the castle was rebuilt and after 1782 it was used as a barracks. Ján Illésházy's plans to renovate the castle were not realized, as it was destroyed by fire in 1790. More intensive renovation work only began in 1956 and continues to this day.