The Dampierre family played an important role during the Middle Ages. Named after Dampierre, in the Champagne region, where members first became prominent, members of the family were later Count of Flanders, Count of Nevers, Counts and Dukes of Rethel, Count of Artois and Count of Franche-Comté.
The senior line of the House came to an end with the death of Margaret III in March 1405. She was succeeded in Flanders, Artois, Nevers and Franche-Comté by her eldest son John the Fearless and in Rethel by her younger son Anthony, which marked the start of the House of Valois-Burgundy. The junior line, springing from a younger son of Guy I reigning in Namur, ended in 1429. The earliest known member of the House of Dampierre is Guy I of Dampierre, great-grandson of Guy I of Montlhéry through his son Milo I of Montlhéry.
The members of the House of Dampierre had an antagonistic relation with the House of Avesnes.
Baldwin, the first emperor of the Latin Empire of Constantinople, was as Baldwin IX Count of Flanders and as Baldwin VI Count of Hainaut. Baldwin had only daughters and was in turn succeeded by his daughters Joan (reigned 1205-1244) and Margaret II (reigned 1244-1280).
In 1212 Margaret II married Bouchard d'Avesnes, a prominent Hainaut nobleman. This was apparently a love match, though it was approved by Margaret's sister Joan, who had herself recently married. The two sisters subsequently had a falling-out over Margaret's share of their inheritance, which led Joan to attempt to get Margaret's marriage dissolved. She alleged that the marriage was invalid, and without much inspection of the facts of the case Pope Innocent III condemned the marriage, though he did not formally annul it. Bouchard and Margaret continued as a married couple, having 3 children, as their conflict with Joan grew violent and Bouchard was captured and imprisoned in 1219. He was released in 1221 on the condition that the couple separate and that Bouchard get absolution from the pope. While he was in Rome, Joan convinced Margaret to remarry, this time to William II of Dampierre, a nobleman from Champagne. From this marriage Margaret had two sons: William II, Count of Flanders and Guy of Dampierre. This situation caused something of a scandal, for the marriage was possibly bigamous, and violated the church's strictures on consanguinity as well. The disputes regarding the validity of the two marriages and the legitimacy of her children by each husband continued for decades, becoming entangled in the politics of the Holy Roman Empire and resulting in the long War of the Succession of Flanders and Hainault.
In 1246 king Louis IX of France, acting as an arbitrator, gave the right to inherit Flanders to the Dampierre children, and the rights to Hainaut to the Avesnes children. This would seem to have settled the matter, but in 1253 problems arose again. The eldest son, John I of Avesnes, who was uneasy about his rights, convinced William of Holland, the German king recognized by the pro-papal forces, to seize Hainaut and the parts of Flanders which were within the bounds of the empire. William of Holland was theoretically, as king, overlord for these territories, and also John's brother-in-law. A civil war followed, which ended when the Avesnes forces defeated and imprisoned the Dampierres at the Battle of West-Capelle of 4 July 1253, after which John I of Avesnes was able to force Guy of Dampierre and his mother to respect the division of Louis and grant him Hainault.
Margaret did not rest in her defeat and did not recognise herself as overcome. She instead granted Hainault to Charles of Anjou, the brother of King Louis, who had recently returned from the crusade. Charles took up her cause and warred with John I of Avesnes, but failed to take Valenciennes and just missed being killed in a skirmish. When Louis returned in 1254, he reaffirmed his earlier arbitration and ordered his brother to get out of the conflict. Charles returned to Provence. With this second arbitration of the holy king, the conflict closed and John I of Avesnes was secure in Hainault.
The main line of the House of Dampierre, originally only counts of Flanders, had managed to inherit the counties of Nevers (1280) and Rethel (1328) through a clever marriage policy. Through Louis II's mother, a daughter of King Philip V of France, the counties of Artois and Burgundy (the "Franche Comté") were added to this. These lands were to provide the core of the dominions of the House of Valois-Burgundy, which were, together with the Duchy of Burgundy, to provide them with a power base to challenge the rule of their cousins, the Valois kings of France in the 15th century.
In 1263, the count of Namur, Baldwin II of Courtenay, sold his county to Guy I of Dampierre. Guy in turn gave over the county on his death to his younger son John I from his marriage to his second wife Isabelle of Luxembourg. The house of Dampierre would rule Namur until 1421, when the county of Namur was sold to the Burgundian duke Philip the Good. The last Dampierre count, John III, died in 1429.