Under Frederick II the Quarrelsome, it was finally surrounded by a moat, outer walls and towers.
In 1246, the Battle of the Leitha was fought east of the castle, and Frederick II was killed.
The wall was removed, however, under Otakar II of Bohemia by 1253 and then built up again in the late 13th century.
In many places of the castle, the inscription “A.E.I.O.U.” can still be found, which dates back to Frederick III.
1486 saw a renewed siege by Matthias Corvinus, which ended after two years with the defenders' surrender.
Maximilian was buried in St. George's Chapel, although previously a tomb had been built in the Innsbruck Court Church.
In 1521,[dubious – discuss] Emperor Ferdinand I retreated to the castle because of the resistance of the Protestant Estates.
The castle therefore remained closed (because of the risk of infection) for two years after the withdrawal of the survivors.
In 1751, the Theresian Military Academy was founded by Empress Maria Theresa and established in the castle.
During the bombings at the end of World War II in 1944–45, the castle (just like the city as a whole) was so badly damaged that only the outer walls remained standing.
The originally swampy area between the town and Leitha river was drained under Frederick III.