In 1610 the cartographer John Speed produced a map of the castle, and noted that it was "large and in good repair."
In 1642, however, civil war broke out between the rival Royalist supporters of King Charles I and Parliament.
Cardiff Castle was then owned by Philip Herbert, a moderate Parliamentarian, and the castle was initially held by a pro-Royalist garrison.
It was taken by Parliamentary forces in the early period of the war, according to popular tradition by a sneak attack using a secret passageway.
The Royalist commander William Seymour, the Marquess of Hertford, then attacked the castle in turn, taking it in a surprise assault.
Parliamentary forces and local troops then immediately besieged the castle, retaking it after five hours of fighting and reinstalling a garrison.
In early 1645 Mr Carne, the High Sheriff, rebelled against Parliament, taking Cardiff town but initially failing to seize the castle.
The King sent forces from Oxford, under the command of Sir Charles Kemys, to reinforce Carne but Parliament despatched a naval squadron to provide support to their forces from the sea.
A small battle ensued before the castle was taken by the Royalists.

With the Royalist military position across the country worsening, King Charles himself came to Cardiff Castle that July to meet with local Welsh leaders.
Relations between his commander in the region, Sir Charles Gerard, and the people of Glamorgan had deteriorated badly and when Charles left the castle, he was confronted by a small army of angry locals, demanding to be given control of the castle.
These clubmen then declared themselves the "Peaceable Army" and increased their demands to include near independence for the region.
After negotiations, a compromise was found in which the royal garrison would quit the castle, to be replaced by a local Glamorgan force, commanded by Sir Richard Beaupré; in return, £800 and a force of a thousand men were promised to Charles.
In September, Charles returned to South Wales and reneged on the agreement, disbanding the Peaceable Army, but his military position in the region was collapsing.
The Peaceable Army's leaders switched sides and forced the surrender of Cardiff and the castle to Parliament in mid-September.

With the outbreak of fresh fighting in 1648, a Royalist army of 8,000 fresh recruits was mustered under the command of General Rowland Laugharne and Sir Edward Stradling, with the intent of retaking Cardiff.
Parliamentary forces in Brecon under the command of Colonel Thomas Horton moved quickly to reinforce the castle, although with only 3,000 men they were content to wait until a larger army under Oliver Cromwell could arrive from Gloucester.
With time against them, the Royalist army attacked, leading to the battle of St Fagans just to the west of Cardiff, and a heavy Royalist defeat.

After the war, Cardiff Castle escaped the slighting, or deliberate damage and destruction, that affected many other castles.
Probably because of the threat of a pro-Royalist invasion by the Presbyterian Scots, a Parliamentary garrison was installed instead and the castle remained intact.
The Herberts continued to own the castle as the Earls of Pembroke, both during the interregnum and after the restoration of Charles II.
The castle's constable continued to act as mayor of the town of Cardiff, controlling the meetings of the town's burgesses, bailiffs and aldermen; the Herberts usually appointed members of the more important local gentry to this position during the period.

Lady Charlotte Herbert was the last of the family to control Cardiff Castle.
She married twice, latterly to Thomas, Viscount Windsor, and on her death in 1733 the castle passed to their son, Herbert.
Herbert's daughter, Charlotte Jane Windsor, married, in November 1766, John, Lord Mount Stuart, who rose to become the Marquess of Bute in 1794, beginning a family line that would control the castle for the next century.

In 1776, Lord Mount Stuart (later created The 1st Marquess of Bute in 1794) began to renovate the property with the intention of turning it into a residence
In 1610 the cartographer John Speed produced a map of the castle, and noted that it was "large and in good repair." In 1642, however, civil war broke out between the rival Royalist supporters of King Charles I and Parliament. Cardiff Castle was then owned by Philip Herbert, a moderate Parliamentarian, and the castle was initially held by a pro-Royalist garrison. It was taken by Parliamentary forces in the early period of the war, according to popular tradition by a sneak attack using a secret passageway. The Royalist commander William Seymour, the Marquess of Hertford, then attacked the castle in turn, taking it in a surprise assault. Parliamentary forces and local troops then immediately besieged the castle, retaking it after five hours of fighting and reinstalling a garrison. In early 1645 Mr Carne, the High Sheriff, rebelled against Parliament, taking Cardiff town but initially failing to seize the castle. The King sent forces from Oxford, under the command of Sir Charles Kemys, to reinforce Carne but Parliament despatched a naval squadron to provide support to their forces from the sea. A small battle ensued before the castle was taken by the Royalists.
With the Royalist military position across the country worsening, King Charles himself came to Cardiff Castle that July to meet with local Welsh leaders. Relations between his commander in the region, Sir Charles Gerard, and the people of Glamorgan had deteriorated badly and when Charles left the castle, he was confronted by a small army of angry locals, demanding to be given control of the castle. These clubmen then declared themselves the "Peaceable Army" and increased their demands to include near independence for the region. After negotiations, a compromise was found in which the royal garrison would quit the castle, to be replaced by a local Glamorgan force, commanded by Sir Richard Beaupré; in return, £800 and a force of a thousand men were promised to Charles. In September, Charles returned to South Wales and reneged on the agreement, disbanding the Peaceable Army, but his military position in the region was collapsing. The Peaceable Army's leaders switched sides and forced the surrender of Cardiff and the castle to Parliament in mid-September.
With the outbreak of fresh fighting in 1648, a Royalist army of 8,000 fresh recruits was mustered under the command of General Rowland Laugharne and Sir Edward Stradling, with the intent of retaking Cardiff. Parliamentary forces in Brecon under the command of Colonel Thomas Horton moved quickly to reinforce the castle, although with only 3,000 men they were content to wait until a larger army under Oliver Cromwell could arrive from Gloucester. With time against them, the Royalist army attacked, leading to the battle of St Fagans just to the west of Cardiff, and a heavy Royalist defeat.
After the war, Cardiff Castle escaped the slighting, or deliberate damage and destruction, that affected many other castles. Probably because of the threat of a pro-Royalist invasion by the Presbyterian Scots, a Parliamentary garrison was installed instead and the castle remained intact. The Herberts continued to own the castle as the Earls of Pembroke, both during the interregnum and after the restoration of Charles II. The castle's constable continued to act as mayor of the town of Cardiff, controlling the meetings of the town's burgesses, bailiffs and aldermen; the Herberts usually appointed members of the more important local gentry to this position during the period.
Lady Charlotte Herbert was the last of the family to control Cardiff Castle. She married twice, latterly to Thomas, Viscount Windsor, and on her death in 1733 the castle passed to their son, Herbert. Herbert's daughter, Charlotte Jane Windsor, married, in November 1766, John, Lord Mount Stuart, who rose to become the Marquess of Bute in 1794, beginning a family line that would control the castle for the next century.
In 1776, Lord Mount Stuart (later created The 1st Marquess of Bute in 1794) began to renovate the property with the intention of turning it into a residence 
Cardiff Castle