Nearly half of all pregnancies are unintended; thus, existing family planning options are inadequate. For men, the only choices are condoms and vasectomy, and most current efforts to develop new contraceptives for men impact sperm development, meaning that contraception requires months of continuous pretreatment. Here, we provide proof-of-concept for an innovative strategy for on-demand contraception, where a man would take a birth control pill shortly before sex, only as needed. Soluble adenylyl cyclase (sAC) is essential for sperm motility and maturation. We show a single dose of a safe, acutely-acting sAC inhibitor with long residence time renders male mice temporarily infertile. Mice exhibit normal mating behavior, and full fertility returns the next day. These studies define sAC inhibitors as leads for on-demand contraceptives for men, and they provide in vivo proof-of-concept for previously untested paradigms in contraception; on-demand contraception after just a single dose and pharmacological contraception for men.