There were no formal written laws, legislatures, or courts before agriculture, because the societies in question were small, mobile foraging bands that governed behavior through custom, kinship obligation, oral tradition, and immediate social sanction rather than through codified statutes. The question is nevertheless worth taking seriously, because "law" and "agriculture" each cover a range of arrangements, and the interesting answer lies in distinguishing what genuinely did not exist from what clearly did.
What the question is really asking
Two ambiguities need to be separated at the outset. First, "laws" could mean written legislation, or it could mean binding rules of conduct enforced by the community. The first almost certainly did not exist anywhere before farming; the second almost certainly did, in some form, wherever people lived together. Second, "before agriculture" is not a single moment. It describes the entire human past up to the independent inventions of farming in several regions, beginning roughly 12,000 years ago in Southwest Asia and later in China, Mesoamerica, the Andes, New Guinea, parts of Africa, and eastern North America. It also describes people who remained foragers long after farming existed elsewhere—and foragers still exist today in some parts of the world. These are not the same situation, and it helps to keep them apart.
So the precise answer depends on definition. If by "law" you mean enacted, written, institutionally administered rules, the answer is no, and it is no for ordinary reasons: writing itself was invented only around 5,000–5,500 years ago, and in most cases after states and agriculture had already taken hold. If by "law" you mean socially enforced norms, the answer is yes—but calling them "laws" flattens an important distinction that legal anthropologists and archaeologists have spent a century trying to sharpen.
Why writing and agriculture are entangled
The earliest writing systems we know—Mesopotamian cuneiform from around 3200 BCE and later scripts elsewhere—developed in state societies with agriculture, surplus, taxation, and record-keeping. The very first surviving written documents are mostly administrative: ration lists, accounts of grain and livestock, receipts, and inventories. Law codes such as those of Ur-Nammu (c. 2100 BCE) and Hammurabi (c. 1750 BCE) come later and presuppose a state with courts, officials, and property regimes. This means that asking for pre-agricultural written law is asking for something that, in the archaeological record, essentially cannot exist: the technology of writing and the institution of codified law both belong to the world agriculture made possible, at least in the earliest known cases.
That is an empirical and definitional point, not a philosophical one. It is possible in principle that a foraging society could have adopted writing, but no unambiguous pre-agricultural writing system is known from the archaeological record. Some early symbol systems—geometric marks on bone or shell, painted signs, and the like—are debated as precursors to notation or memory aids, but they are not laws, and identifying them as writing at all is contested.
What foraging societies actually had
The absence of codified law did not mean the absence of obligation. Anthropological and archaeological evidence, together with historical accounts of foragers, points to several recurring features:
Kinship as the framework of rights and duties. In small bands, who owes what to whom is largely determined by relationship: parent to child, spouse to spouse, sibling to sibling, and the wider web of obligations among cousins and affines. The rules are not abstract; they are embedded in the roles a person occupies.
Sharing norms and their enforcement. Food sharing, especially of large game, is a widespread and well-documented feature of foraging economies, and violations carry real consequences—gossip, mockery, withdrawal of cooperation, sometimes ostracism. This is law-like in function but not in form.
Customary rules about marriage, residence, and violence. Post-marital residence patterns, incest prohibitions, and the management of disputes are governed by custom and negotiated case by case. Disputes may be resolved by mediation, by senior kin, by public airing, or by fission—one group splitting and moving apart. Splitting is a distinctly pre-state remedy: when you cannot tolerate your neighbors, you leave.
Oral transmission. Norms are remembered and recited rather than written. This matters for how stable and how flexible they can be: oral traditions can preserve rules across generations, but they also invite variation each time they are performed, and there is no authoritative text to appeal to when interpretations conflict.
Sanctions that do not require a state. Shame, reciprocity, reputation, the threat of retaliation, and withdrawal of future help do much of the work that courts later formalize. Small, face-to-face groups make such sanctions unusually powerful, because everyone knows everyone and there is no anonymity to hide in.
No monopoly on force. The crucial difference from state law is institutional. In a foraging band there is no specialized police, no standing judiciary, no codified penalty schedule, and no central authority with a recognized right to impose and enforce decisions. Enforcement is diffuse and communal, or it does not happen at all.
Distinctions that matter
Custom versus law. "Customary law" is a real and useful term, but it is a term of legal anthropology and comparative law, and applying it to pre-agricultural foragers is an act of classification, not a report of what they thought they were doing. Foragers did not call their norms "law"; the vocabulary of law as a separate, named domain is itself a product of societies with courts and texts. A useful distinction: custom is followed because it is what is done; law is a rule that an institution is prepared to apply and enforce against a person who contests it. Pre-agricultural societies had the former in abundance and the latter only in diffuse, informal form.
Small scale versus no rules. A common confusion is to equate the absence of courts with the absence of order. The opposite inference is at least as plausible: in a group of twenty-five or fifty people, social pressure is more immediate, not less. Everyone's reputation is visible; exit is possible but costly; cooperation is repeated rather than one-off. The result can be highly regulated behavior without any legal apparatus. But the point should not be romanticized either: small-scale societies can also be harsh, and disputes can end in violence. Informal order is not automatically gentle order.
Archaeology's limits. Nobody can excavate a rule. Archaeologists reconstruct social organization from burials, settlement layouts, storage facilities, exchange goods, and traces of conflict. They can reason about inequality, group size, and violence, but the actual content of norms—who was obliged to whom, what counted as a wrong, how a grievance was handled—is largely inaccessible from material remains alone. Where archaeologists infer "rules" from patterns, that is interpretation, not direct observation. This is one reason the question cannot be answered with a simple yes or no: the evidence bears on the presence of social regulation, not on its precise content.
The ethnography problem. Anthropological descriptions of foragers come mostly from the nineteenth and twentieth centuries, and often from peoples affected by states, markets, and colonial administration. They are valuable but they are not transparent windows into the deep past. Present-day or recent foragers are not "living fossils," and using them as a model for the Paleolithic would be a mistake. They show that foraging lifeways are compatible with elaborate customary regulation; they do not prove what any particular prehistoric group actually did.
The boundary of the category. "Before agriculture" sometimes means "before the Neolithic in a given region," and sometimes means "before any farming anywhere." These differ sharply. A forager in 8,000 BCE in northern Europe was before local agriculture but after agriculture existed elsewhere. The question's phrase is silent on which one is meant.
Why the answer is not merely negative
There is a real temptation to answer "no" and stop, because there were no legislatures or statutes. That answer is correct in a narrow sense and misleading in a broader one. It risks implying that pre-agricultural life was unregulated, which the evidence does not support. It also risks treating law as the only possible form of social order, when the whole point of the comparison is that other forms existed and did different work.
The better formulation: before agriculture there were no codified, written, institutionally administered laws, but there were binding customary rules enforced through kinship, reciprocity, reputation, and communal sanction. The transition to agriculture—itself a long, uneven, and regionally varied process rather than a single event—is associated with denser populations, stored surplus, fixed property in land, and eventually specialized institutions, including courts and written law. What changes is not the presence of rules but their form, scope, and enforcement apparatus.
It is worth adding that the transition is not one-way or universal. Some agricultural societies remained largely customary and unwritten for millennia; some foragers lived adjacent to states and were affected by their law. The clean contrast between "lawless foragers" and "lawful farmers" is a simplification, and a fairly misleading one.
Where the answer stops applying
The answer depends on the definition of law and on the region and period in question. If the question means "did any human society before agriculture possess enacted, written legislation," the answer is no, and no known counterexample exists in the archaeological or historical record. If the question means "did pre-agricultural people have recognized rules that governed conduct and were enforced," the answer is yes, and it would be surprising if it were otherwise: no human society, of any subsistence type, is known to lack normative regulation of some kind.
What is genuinely unknown is detail. For any specific pre-agricultural society, we usually cannot say what its rules were, how disputes were handled, or how sanctions were applied. The general shape is inferable from ethnography and social theory; the particular content is largely lost. Anyone who claims otherwise—who announces the "law code" of a Paleolithic band—is going beyond what the evidence supports.