The lawsuit was filed by Thursday in a Northern California court by Earthjustice on behalf of the Center for Biological Diversity and Sierra Club.
California's oil-and-gas regulators acknowledge they give oil companies thousands of permits to dump fluid into federally protected underground water supplies.
The two environmental groups say the state's plan for stopping the contamination is moving too slowly. They sued to order immediate state action stopping the discharges into drinking-water aquifers.
State Oil and Gas Supervisor Steven Bohlen declined comment on the litigation. Bohlen did say that the state and the U.S. Environmental Protection Agency "are moving aggressively and quickly to test all wells that risk harming sources of water for drinking and agriculture."