In the first decades of the Warring States period, a new county magistrate arrived at Ye and did not go into his office. He called the elders together and asked them one question: what is the hardest thing about living here.
The answer came back without hesitation. The hardest thing was finding a wife for the River Lord, and because of it the people were poor.
The Book of Accounts
Ye sat on the Zhang River, in what is now the far south of Hebei. In the fifth century BC it was the northeastern gate of the state of Wei, with the state of Zhao on the other bank. A frontier county like that should have had soldiers and grain. The elders said it had poverty.
The Records of the Grand Historian give them a short speech, and the first thing in it is bookkeeping.
Every year, they said, the Three Elders of the district and the clerks of the county office levied a contribution from the people. They collected several million cash. Of that they spent two or three hundred thousand on the wedding, and divided the rest with the shamans and took it home.
That sentence is the whole case. The ritual had accounts. You took in millions, you spent a tenth of it, and the surplus was the point.
A business, run for decades, in the open.
Ten Days of Being a Bride
The second detail was the procedure.
The shaman walked from house to house looking at daughters. When she saw one who was pretty, and whose family was small and had no standing, she announced that this girl was to be the wife of the River Lord. The girl was washed, dressed in silk and fine gauze, and shut away to fast in a bridal hut on the riverbank, hung with orange-red curtains, with beef and wine brought to her. She stayed ten days or more.
Then she was dressed and painted, a bridal mat was laid out as though for a real marriage, and she was set on it and pushed out onto the water. For a while the mat floated. After thirty or forty li it went under.
There is no word for death anywhere in that passage. That is how the historian writes it, and that is the most frightening thing about the case: in Ye it was not a killing. It was a wedding.
A City That Emptied
The third detail is what it did to the county.
Any household with a pretty daughter lived in fear that the great shaman would choose her. So families took their daughters and fled, and the city grew emptier, and the people who stayed grew poorer. The historian adds four characters: this had been going on a very long time.
Why did nobody refuse? Because of a saying.
If we do not find a wife for the River Lord, the water will come and drown the fields and the villages and the people.
That saying is the load-bearing wall of the whole arrangement. The fear inside it was real: the Zhang River did flood. Only the explanation was false. Real fear and a false cause, mixed together, become something nobody dares touch, because whoever touches it is gambling with the life of the whole town.
He Says He Will Attend the Wedding
Ximen Bao listened to all of it and said nothing about fraud.
What he said was: when the time comes to marry the girl to the River Lord, I hope the elders, the shamans and the village fathers will escort her to the river, and I hope someone will come and tell me, because I would like to attend as well. They said yes.
That paragraph is the hinge of the story. He did not announce that the whole thing was a swindle. He did not ban it. He did not send anyone to audit the accounts. He made himself a guest at the ceremony: a new magistrate, courteous, easy-going, willing to observe the local custom.
A man who intends to use his hands has to stand inside the crowd first.

She Is Not Pretty
The day came.
Three or four thousand people turned out, according to the text: the elders, the county staff, the local magnates, the village fathers, and two or three thousand ordinary spectators.
That number matters. This was not a secret. It was the public life of a county, a ceremony at which everyone was present.
The chief shaman was an old woman of seventy, with ten female disciples in plain silk standing behind her.
Then came the sentence everyone remembers. Ximen Bao asked for the bride to be brought out so that he could see whether she was pretty. She was led out of the curtains and stood in front of him. He looked at her, turned to the elders, the shamans and the village fathers, and said:
This girl is not pretty. I must trouble the great shaman to go into the river and report to the River Lord, so that we may find a better one and send her the day after tomorrow.
The attendants picked up the old woman and threw her into the river.
He never said: you are lying. He used their grammar. You tell me the River Lord wants a wife; then someone has to carry word to him; and who understands the River Lord best, if not the person who runs the wedding?
That is the sharpest move in the case. He did not expose the doctrine. He applied it, and handed its cost back to the people who had been charging for it.
The Five, and the Two Who Lived
They waited.
After a while he said: the shaman is taking a long time. Send a disciple to hurry her. Another girl went into the river. A little later: the disciple is taking a long time. Send someone else. A third.
Then the Three Elders. The shaman and her disciples are women, he said, they cannot explain matters properly; I must trouble the Three Elders to go and explain. In went the Three Elders.
Five people, then: an old woman of seventy, three of her disciples, and one district elder who had been collecting the money.
And then the coldest sentence in the chapter. Ximen Bao straightened his robe, tucked his writing brush into the front of his cap, bent his body like a stone chime, and stood facing the river for a long time.
The brush in the cap and the bow were the manners of a subordinate before a superior. He was not committing a murder. He was conducting a ceremony, and he conducted it more correctly than the people who had been running it.
Behind him the elders and the clerks were terrified.
He turned and asked: they have not come back. Should we send the county clerk and one of the magnates down to hurry them?
Both of them went to their knees and kowtowed until their foreheads split and the blood ran on the ground, and their faces were the colour of dead ash.
Very well, he said. We will wait a little longer.
Then he let them up. The River Lord seems to be keeping his guests a long time, he said. You may all go home.
Five went into the water. Two who knelt lived. The number is exact. One more would have been unnecessary, one fewer would not have been enough.
This Was Not Law
At this point the story has to be stopped and said plainly. What Ximen Bao did was kill people.
He did not question them. He did not try them. He did not sentence them. He cited no statute. He used the authority of a county magistrate and the momentum of a public ceremony, and five living people went into the Zhang River.
The text gives none of the five a single line of defence. We are not told whether the three disciples knew what the money was for, or had a share of it. All five were thrown in. Nothing in the record suggests that any family was compensated, or even told why.
In the first years of the Warring States, Li Kui drafted the Book of Law for Wei in six chapters, one of which dealt specifically with killing and wounding. Whatever else was unsettled in that world, the idea that a killer is killed was not.
So Ximen Bao did two things in one morning. He stopped a lawful murder: an annual killing, with a liturgy, with accounts, performed in front of the whole county. And he carried out an unlawful execution: no hearing, immediate, staged by the magistrate himself.
The line between those two things is what we now call procedure.
Article 12 of the Criminal Procedure Law of the People’s Republic of China reads: no person shall be found guilty without being judged as such by a people’s court according to law. It entered the code in 1996 and survived the revisions of 2012 and 2018. The idea is plain. Whether a person is guilty is decided by a body competent to decide it; not by an official’s judgement, not by the size of the crowd, not by what the occasion requires.
It would be unfair to hold a magistrate of the fifth century BC to that standard, because he had no other tool. To arrest he needed evidence; to hold, cells and jailers, and the jailers could be bought; to sentence, he had to report upward to a man he might not be able to offend. Every step could be stalled for years, and the wedding came once a year.
He chose the only method that could be finished before noon.
This is not an argument for private killing. It is an observation about what happens before procedure exists: what stops an atrocity is often a larger and more dangerous improvisation. That morning it worked. The next morning it might not have.
Water Was the Answer
The story does not end at the riverbank.
Ximen Bao then set the people to digging twelve channels, drawing the Zhang River off to irrigate the fields, and the fields were watered.
That is the real reason the weddings stopped. The practice did not rest on sorcery. It rested on a true causal chain: the river floods. As long as the river floods, there will be people who believe something in the water wants appeasing, and people willing to trade a girl for a year of safety. Once the channels took the water away, the chain was cut.
The digging was hard labour, and the people resented it. Ximen Bao answered with a sentence quoted approvingly for two thousand years, and which deserves an argument instead: the people can be made to enjoy the result, but they cannot be consulted about the beginning.
That sentence divides humanity into those who plan and those who get through the day. In this instance he was right: the channels worked, and the county was still irrigating from them centuries later. But as a principle it is one step from I decide.
There is a postscript that undercuts him in a useful way. In the early Han, officials wanted to merge the channels and cut the number of bridges across the imperial highway. The elders of Ye refused, on the grounds that this was the work of Lord Ximen and the rules of a wise magistrate could not be altered. The officials gave way.
Generations later, what Ye remembered was not the five people at the river. It was the water.
Who Wrote This Down
One more thing has to be said, about the text itself.
The story of Ximen Bao at Ye is not in the part of the Records of the Grand Historian that Sima Qian wrote. It sits at the end of the chapter, in a section introduced by the words Master Chu says.
Master Chu was Chu Shaosun, a court scholar of the late first century BC. Ten chapters of the Records were lost after Sima Qian died, and Chu helped reconstruct them. Later commentators thought his prose inferior to the original. That is a fact about the surviving text.
It does not follow that the story is invented, because the same affair leaves a trace elsewhere, and the trace points the other way.
The Book of Han, in its chapter on waterworks, records a banquet of King Xiang of Wei. The king raised a cup and wished that all his ministers were men like Ximen Bao. A official named Shi Qi answered on the spot: in Wei a man is granted a hundred mu of field, but at Ye the grant is two hundred, because the land is bad. The Zhang River runs beside it. Ximen did not know how to use it. That is folly. To know and not to build is worse.
Read that literally and Ximen Bao never dug a channel at all. He was a man who sat next to a river and did nothing with it.
The two books disagree. Later geographers credited both men: the old Tang commentary on the Records cites a local topography saying the canal head at Hengqu drew on the Zhang River, and that the channels were dug by Ximen Bao and Shi Qi together. Two generations of work, one family of names.
I am not going to settle it. What can be said is that the core of the story, a magistrate who used a ceremony to kill the people who ran the ceremony, has never died.
That core grew into a genre. The Chinese detective tale, in which one official with a seal and a handful of runners stands against a network, starts here. In the 1950s the Dutch diplomat Robert van Gulik turned that structure into the Judge Dee novels, whose technical backbone came largely from the Washing Away of Wrongs, the forensic manual Song Ci compiled in 1247.
Ximen Bao had no forensic manual. He had a seal, a squad of attendants, and two thousand spectators.
He used the least reliable of the three: the audience.
Afterward
But the line I keep returning to is the smallest one in the chapter. It had been going on a very long time.
A practice that costs one girl a year can run for decades, until the only families who escape are the ones who run. It does not need everyone to believe. It needs enough people unwilling to speak first.
Among the two or three thousand standing at the river that day there must have been men and women who already knew it was a fraud. What they lacked was a position from which to say so in front of others.
Ximen Bao did not investigate. He arrived, and within days he acted; not one day of the record is spent on inquiry. What he did was occupy that position, and then, in front of two thousand people, take the doctrine all the way to its end.
The River Lord never married again. Not because anyone had proved that he did not exist, but because everyone present had watched the argument be turned around and used on the people who owned it.
A county went quiet. But the method only works for a magistrate who has just arrived, before the network has had time to wrap itself around him. And it only works once.
The next time it happens, someone else has to be standing there.