The Lord spoke to Moses, saying: Speak to the Israelites and say to them: If any man’s wife goes astray and is unfaithful to him, if a man has had intercourse with her but it is hidden from her husband, so that she is undetected though she has defiled herself, and there is no witness against her since she was not caught in the act; if a spirit of jealousy comes on him, and he is jealous of his wife who has defiled herself; or if a spirit of jealousy comes on him, and he is jealous of his wife, though she has not defiled herself; then the man shall bring his wife to the priest. And he shall bring the offering required for her, one-tenth of an ephah of barley flour. He shall pour no oil on it and put no frankincense on it, for it is a grain offering of jealousy, a grain offering of remembrance, bringing iniquity to remembrance.
Then the priest shall bring her near, and set her before the Lord; the priest shall take holy water in an earthen vessel, and take some of the dust that is on the floor of the tabernacle and put it into the water. The priest shall set the woman before the Lord, dishevel the woman’s hair, and place in her hands the grain offering of remembrance, which is the grain offering of jealousy. In his own hand the priest shall have the water of bitterness that brings the curse. Then the priest shall make her take an oath, saying, “If no man has lain with you, if you have not turned aside to uncleanness while under your husband’s authority, be immune to this water of bitterness that brings the curse. But if you have gone astray while under your husband’s authority, if you have defiled yourself and some man other than your husband has had intercourse with you,” —let the priest make the woman take the oath of the curse and say to the woman—“the Lord make you an execration and an oath among your people, when the Lord makes your uterus drop, your womb discharge; now may this water that brings the curse enter your bowels and make your womb discharge, your uterus drop!” And the woman shall say, “Amen. Amen.”
Then the priest shall put these curses in writing, and wash them off into the water of bitterness. He shall make the woman drink the water of bitterness that brings the curse, and the water that brings the curse shall enter her and cause bitter pain. The priest shall take the grain offering of jealousy out of the woman’s hand, and shall elevate the grain offering before the Lord and bring it to the altar; and the priest shall take a handful of the grain offering, as its memorial portion, and turn it into smoke on the altar, and afterward shall make the woman drink the water. When he has made her drink the water, then, if she has defiled herself and has been unfaithful to her husband, the water that brings the curse shall enter into her and cause bitter pain, and her womb shall discharge, her uterus drop, and the woman shall become an execration among her people. But if the woman has not defiled herself and is clean, then she shall be immune and be able to conceive children.
The nature of the bitter water, the exact nature of this ritual and its intended effects, and the precise translation of various words, are debated. As translated here (the New Revised Standard Version), it seems to imply that an abortion will take place if the woman is pregnant by adultery: “Her womb shall discharge.” The last part seems to imply that she will become barren if she is guilty, but it also has been interpreted to mean that she will die:
If the woman is guiltless, she may depart; she is permitted to her husband. If she committed adultery, her face will immediately turn pale yellow, her eyes will bulge forth, and her veins will surface.
Everyone immediately shouts, “Take her out [of the Women’s Courtyard]! Take her out!” so that she does not have a menstrual emission [there], for women who are in a menstrual state make the Women’s Courtyard impure.
They take her out of the Women’s Courtyard, where she was standing. Her belly swells first and then her thigh ruptures and she dies.
Regardless of the details, however, it seems clear enough that the ritual as a whole is a form of trial by ordeal. God is supposed to produce a different result depending on whether the woman is guilty or innocent of adultery. Performing such a ritual in real life would be a form of tempting God, and it would surely not have the desired results in general. Perhaps the results would differ from case to case, but this is no different from any other trial by ordeal: guilt or innocence is not really relevant. An innocent woman can get the bad results, and a guilty woman can get the good results.