Richard I of England, simultaneously feudal Duke of Normandy, ordered that the castle be built in little more than 12 months, between 1197 and 1198. The goal was to protect Rouen and Richard's duchy of Normandy from the French kings, but Richard died due to an infected arrow wound on his shoulder before the fortress was complete.
The construction of Château Gaillard was taken over by his brother John. The building of the castle continued but for two alterations at John's request. One was to have an extra window built on the chapel's outer wall and the other was to have an extra toilet in the chapel.
The outer bailey had the signature characteristic of Chateau Gaillard in that the wall was formed in arcs of stone. This feature, that was an innovation for 12th-century France, had two advantages: first, the round wall absorbed the damage from siege engines much better—the wall did not provide a perfect angle to aim at; second, the arrow slits in the curved wall allowed arrows to be fired at all angles.
The troops of Philip II of France captured it after a long siege in 1203, some 4 years after Richard's death. During the siege, Philip ordered a group of his men to look for a weak point in the castle. The French had gained access to the outermost ward on the line of approach by undermining the tower. Following this, they located the disposal chute for the toilet which John had requested. They climbed up it and into the chapel, which was locked from the outside, so they broke a window and climbed along the castle wall. After ambushing several unsuspecting guards, and setting fire to the buildings, Philip's men then lowered the drawbridge and allowed the rest of their army into the castle. The Anglo-Norman troops retreated to the inner ward. After a short time the French successfully breached the gate of the inner ward, and the Anglo-Normans retreated finally to the keep. However, after a short time they surrendered to the French, bringing to an end the siege of Château-Gaillard.
Following the defeat at the Battle of Halidon Hill in 1333 during the Second War of Scottish Independence, the child-king David II and certain of his court were forced to flee to France for safety. At the time, Southern Scotland was occupied by the forces of English king Edward III. David, nine years old, and his bride Joan of the Tower, the twelve year old daughter of Edward II, were granted the use of the castle by Philip VI. It remained their residence until David's return to Scotland in 1341. David did not stay out of English hands for long after his return; he was captured after the Battle of Neville's Cross in 1346 and endured an eleven year captivity.
Having lost any strategic value, Château-Gaillard was dismantled under Henry IV of France after 400 years of existence.