The first castle at Bonaguil was constructed after the middle of the 13th century (between 1259 and 1271 according to Jacques Gardelle), on a rocky spur, probably by Arnaud La Tour de Fumel.
The first written mention is in 1271, in a charter listing the possessions of the King of France Philippe III le Hardi.
The considerable defence works of the castle have their origin in the lord of Bonaguil's problems with King Charles VII, who condemned him for his violence against serfs and vassals.
They were financed thanks to the good fortune of the Roquefeuils, who owned lands in the Gironde and the Golfe du Lion.
An external wall, 350 m in length, was added to the castle, with lower curtains retaining a mass of earth which cushioned the artillery shots.
This was the second innovation of this rebuilding: provision for the use of masses of artillery for the defence of the castle, with a total of 104 embrasures for firing.
So the castle used the latest developments in armaments: push back the firing of the assailants by obliging them to set up their cannons further away; make the approach difficult with openings for ground shot; large calibre guns were put on top of the towers (such as the platform on top of the keep) so as to fight at a distance.
His son Antoine-Alexandre was a marquis, but passed on to his only daughter Marie-Gilberte a castle in a poor state and empty coffers.
Married from the death of her father (8 July 1639) to the Marquis of Coligny-Saligny, she devoted herself to the repair and maintenance of the castle.
She remarried in 1655 to Claude-Yves de Tourzel, Marquis of Allègre, with whom she had a daughter who married Seignelay, minister of the Colbert family.
François de Roquefeuil, a distant relative with some claim to the castle, took possession of it in 1656, kept and pillaged it for almost a year before abandoning it.
Marie-Gilberte lived in Paris for the last years of her life, and abandoned the château de Bonaguil, until her death in 1699.
In this period, the earthworks to the west of the castle were enlarged and laid out as a large terrace and became a pleasant promenade.