It is located in Largo do Castelo, parish, city and municipality of Trás-os-Montes, District of Bragança, Northeast of Portugal
 
The border Castle linked to the neighbors of Algoso, Penas Roias and Mogadouro, as well as the one further away from Bragança, together constituted the so-called hard core of the Northeast of Trás-os-Montes.

The Miranda do Douro castle was built during a second period of settlement in Trás-os-Montes, during the reign of D. Dinis, who in 1286 ordered the construction of a castle at one end of the town, to which was associated with an urban fence designed to protect the population.

The natural transformations in subsequent centuries were joined by a violent explosion in 1762 that disfigured fundamental parts of the Gothic work.

The castle had a rectangular shape and its walls connected the formidable keep, located at one of the angles, to three other lower towers also in an angular position.

This description announces a typically Gothic fortress, with doors and corners actively defended by high towers that allowed vertical shooting.

From the second half of the 16th century onwards, the fortress underwent several changes, which aimed to convert it into a modern square adapted to artillery warfare.

Around the town's fence, the main work carried out at that time was the construction of a bastion in front of the main door, which was joined by several guardhouses in the corners.

More radical were the works on the castle that required the destruction of a large part of the towers and the leveling of the land for the installation of artillery pieces.

In May 1762, at a time when the square was trying to resist Spanish troops, the magazine exploded, taking with it some sections that were never rebuilt.

This easy description gives us a glimpse of a typically Gothic fortress, with doors and angles actively defended by high towers that allowed vertical fire on the most sensitive points. The main door, which was associated with one of the towers, was shaped like an elbow, a design equally characteristic of 14th century military architecture.

The town was walled and its urban layout reveals planning from scratch, two doors, facing East and West and flanked by two quadrangular towers forming a harmonious set, allowed access to the town, and were connected by a straight street that converges in the center in a square, today Praça de D. João III.

This artery was crossed by other secondary roads forming an orthogonal network, of which the current Rua Mouzinho de Albuquerque stands out, which connected the central square to the door that led to the river.

One of the peculiarities of the medieval town was the existence of a breastplate (still designed by Duarte d’Armas at the beginning of the 16th century) that protected residents’ access to the river, a structure dismantled during the modern era.

From the second half of the 16th century onwards, the fortress underwent several changes, which aimed to convert it into a modern square adapted to artillery warfare.

The castle has a quadrangular plan, with its walls made of granite and schist, battlemented and reinforced in the three external angles by cubes (two rectangular in plan and one hexagonal) surrounding a considerable parade ground, currently reduced to a large courtyard.

To the north, the complex is dominated by the Keep at 682 meters above sea level.

The town's fence covered a total perimeter of six hundred paces and was torn by three broken-arch doors: the Porta da Senhora do Amparo at the end of Rua da Costanilha, the Porta Falsa next to the castle area, and the Postigo to the east on the bank of the Douro River.