Though of ancient origin, Blois is first distinctly mentioned by Gregory of Tours in the 6th century, and the city gained some notability in the 9th century, when it became the seat of a powerful countship with «Blesum castrum» («Le château de Blois»). In 1171, Blois was the site of a blood libel against its Jewish community that led to 31 Jews (by some accounts 40) being burned to death. Their martyrdom also contributed to a prominent and durable school of poetry inspired by Christian persecution. In 1196, Count Louis granted privileges to the townsmen; a commune, which survived throughout the Middle Ages, probably dated from this time. The counts of the Châtillon line resided at Blois more often than their predecessors, and the oldest parts of the château (from the thirteenth century) were built by them. In 1429, Joan of Arc made Blois her base of operations for the relief of Orléans. Joan of Arc rode the thirty-five miles on Wednesday 29 April to Blois to relieve Orléans. After his captivity in England, Charles of Orléans in 1440 took up his residence in the château, where in 1462 his son, afterwards Louis XII, was born. In the 16th century Blois was often the resort of the French court. The Treaty of Blois, which temporarily halted the Italian Wars, was signed there in 1504–1505.
The city's inhabitants included many Calvinists, and in 1562 and 1567 it was the scene of struggles between them and the supporters of the Catholic Church. In 1576 and 1588 Henri III, king of France, chose Blois as the meeting-place of the States-General, and in 1588 he brought about the murders of Henry, duke of Guise, and his brother, Louis, archbishop of Reims and cardinal, in the Château, where their deaths were shortly followed by that of the queen-mother, Catherine de' Medici. From 1617 to 1619 Marie de' Medici, wife of King Henri IV, exiled from the court, lived at the château, which was soon afterwards given by King Louis XIII to his brother Gaston, Duke of Orléans, who lived there till his death in 1660.
Blois was occupied during World War II by the German army, which took the city on 18 June 1940. The city was liberated by American soldiers during the last two weeks of August 1944. On both occasions, the city withstood several days of bombing.