Owing the regions occupation by successive tribes of Celts, Romans and Muslims, it is likely that the territory of Campo Maior has been settled during the pre-historic epochs. The land of Campo Maior was definitively conquered from the Moors by the forces of Kingdom of León in 1230. The first foral (charter) was issued by the Bishop of Badajoz thirty years after this event.
Eventually, the castle was conquered by the Portuguese in 1295-1296, and integrated into the national territory in 1297, under the Treaty of Alcanizes. In order to maintain the peace between Spain and Portugal, King Denis ordered the reconstruction of the fortress in 1310, oriented toward his Iberian rivals. These fortifications were extended and rehabilitation during the 15th and 16th century completed, during the reigns of his successors John and Manuel, designed by Duarte d'Armas.
Around 1640, following the Portuguese Restoration War, King John IV established a Counsel of War that formed their territory into military provinces: Minho, Trás-os-Montes, Beira, Estremadura, Alentejo and Algarve. Therefore, following the decision of John IV, work began in 1645 under the supervision of João Cosmander to reconstruct the bulwarks. Between 17th and 18th century the fortification was adapted for the time, obtaining the bulwarks and secondary walls, in addition to the installation of permanent military storehouses, stables and barracks. After 1644, many of the reconstruction of the fortress was handled by Nicolau de Langres. A document, dated 14 May 1647, identified Langres as the military engineer of the project, while requesting material for the construction of military square, in addition to the arms necessary to protect the castle and its surrounding territory. In 1662, Luís Serrão Pimentel continued work on the walls.
On 22 May 1680, D. Peter, acting as regent, ordered Mateus do Couto, D. Diogo Pardo and António Rodrigues to Campo Maior, in order to verify the work being done on the citadel, under the plans of Luís Serrão Pimentel.