In the Trás-os-Montes region, Mirandela has always occupied a central place within the territory. In 1198, one of the first references to the settlement occurred with the stay of King D. Sancho I when Bragança was under siege by troops loyal to King Alfonso IX of León.
King D. Afonso III conceded a foral to Mirandela in 1250. It is likely that the construction of the castle and wall fortifications were begun at this time, in order to protect the population. The 1258 Inquiries suggest that the settlement had existed since the reign of King Afonso II. In 1282, the primitive settlement of Mirandela was transferred from the locale of Castelo Velho to the elevated hilltop of Cabeçao de São Miguel by regal charter. During the sequence of this event, the monarch also issued orders to erect a citadel and keep tower. At the time of its completion it was considered, for the epoch, one of the better fortifications in the Trás-os-Montes region.
On 7 March 1291, King D. Dinis conceded a new foral and defined the limites of the municipal territory of Mirandela. Construction of the tower and walls along the hilltop of São Miguel continued. Within the walls, the first fair occurred in 1295.
On 27 June 1301, a letter of donation was issued for the town of Mirandela to Branca Lourenço.
A notice was issued in 1318, regarding the position of the citadel at Mirandela by the King to Domingos Geraldes, in virtue of the state of abandon, which was designated as the Paaço del Rey (the Palace of the King).
The castle was mentioned between 1383 and 1385, in the Chronicle of D. João I by Fernão Lopes, who indicated Mirandela's support of the pretensions of the Master of Avis. During this time and extending to 1448, Mirandela was one of the medieval castles that suffered several interventions to conserve and reinforce the structure.
Notice in 1401 indicated that public works were being undertaken on the walls and dungeons through the initiative of the Crown, owing to the war.