Roman law prohibited marriages between close kin, whether by blood and by marriage, which the Christian emperors of the 4th and 5th centuries expanded upon. None of these laws, however, went as far as legalists in later centuries would. The Responsa Gregorii, attributed to Pope Gregory I, prohibited marriage to anyone within seven degrees of kinship. In other words, one couldn’t marry anyone closer than one’s seventh cousin.* It also forbade intercourse (or marriage) with the blood kin of one’s (former) spouse. Merovingian law shared these prohibitions, but took things a step farther, banning marriage between godparents and any member of their godchild’s family as well.
By the 11th and 12th centuries, powerful nobles were using these restrictions as an excuse to dissolve marriages that they wanted out of for other reasons. Possibly the best-known example of this is the divorce of Eleanor of Aquitaine and Louis VII of France upon the “discovery” that they were cousins.** By this point many Church officials were arguing against the dissolution of such marriages, but the camp that said incest was a valid reason to divorce remained strong. In 1215 the Fourth Lateran Council put an end to this by reducing the forbidden degree of kinship from seven to four.
Many members of the lower classes, meanwhile, paid as much attention to these laws and opinions as they did the ones regarding clandestine marriage that is, not much. There are legal cases that show they were aware of the laws, but in many places they seem only to have paid attention when it suited them. For all that the Church tried to impose some control over people of all classes of society through marriage law, members of the laity continued to use the law to their own benefit.
*To give some idea of what this means, if everyone had precisely two offspring, a person would have 64 sixth cousins, 32 fifth cousins, 16 fourth cousins, 8 third cousins, 4 second cousins, and 2 first cousins, or 126 cousins within the forbidden degrees of consanguinity. And this isn't even including one’s cousins at one or two degrees of removal (e.g. the child of one’s third cousin is one’s third cousin once removed), which I am not taking the time to count at the moment.
**Third cousins once removed, to be specific. They had actually known for several years by this point and it seems that Eleanor had wanted out of the marriage for about as long. Louis finally gave in because Eleanor had failed to produce a son. The pair of them promptly remarried with people even more closely related to them.
Brundage, James A. Law, Sex, and Christian Society in Medieval Europe. Chicago: University of Chicago Press, 1987.
Brundage, James A. "The Canon Law of Divorce in the Mid-Twelfth Century: Lousi VII C. Eleanor of Aquitaine." In Eleanor of Aquitaine: Lord and Lady, edited by Bonnie Wheeler and John Carmi Parsons, 213-221. New York: Palgrave Macmillan, 2003.
Coontz, Stephanie. Marriage, a History: How Love Conquered Marriage. New York: Penguin, 2005.
Marriage and Divorce - Consistory Database
Marriage Canons in The Decretum of Gratian - Catholic University of America