The site, 23 km from Valladolid, has been fortified since the tenth century, when it is documented in connection with Moorish forays into the region, under Abd al-Rahman III. In the fourteenth century, and until the early fifteenth, it was in the possession of the family of Sandoval; in 1392 it was confiscated from Diego Gómez de Sandoval in the name of King Juan II of Castile, who granted it in 1438 to Ruy Díaz de Mendoza. From 1448 to 1452, Portillo was occasionally held by Juan's favourite, Don Álvaro de Luna, although the fortress remained in royal hands. Don Álvaro, however, fell from favor, and was detained at Burgos, sent to Portillo until two months later he was tried at Valladolid, and subsequently beheaded in the main Plaza on 2 June 1453. In 1464 Enrique IV of Castile conferred it upon Alfonso, held in trust by Juan Pacheco, the prince's tutor, until his death (1474), though it had been ceded to Rodrigo Alfonso de Pimentel, whose heirs held it until the nineteenth century, when it passed to the family of Osuna.
As the history above indicates, Portilla is better known for the list of distinguished prisoners it has housed, than for being the site of battles or other events. Juan II of Castille was briefly imprisoned at Portillo in 1444 by the Conde de Castro, escaping by bribing one of his guardians. The chronicles also touch upon the fact that Don Enrique, brother of the admiral Don Fabrique y de Suero de Quiñones (who fought at Paso Honroso) was jailed here for conspiring against the crown.
The castle has been a national monument since 1931. It is a property of the University of Valladolid.