Interior Secretary Ken Salazar wanted the rule vacated, saying in April "it failed to pass the smell test." Salazar wanted to return to a 1983 regulation that kept coal companies 100 feet from streams unless they can prove mining won't harm water quality or quantity.
But U.S. District Judge Henry H. Kennedy, Jr., wrote in his ruling that granting Salazar's request would be tantamount to changing a federal regulation without public input.
The Interior Department said it is reviewing the decision.
"This Administration has shown it is determined to improve mining practices and we will do so within the context of the court's ruling," spokeswoman Kendra Barkoff said in an e-mail.
The ruling is a victory for the U.S. coal industry but another defeat for opponents of a practice called mountaintop removal mining, a process in which mining companies remove vast areas to expose coal. While they are required to restore much of the land, the removal creates many tons debris that's used to fill nearby valleys.
Groups such as the Sierra Club want the practice banned, claiming it destroys mountaintops and pollutes water, among other things. The coal industry argues that surface mines provide high-paying jobs and cheap electricity.
Sierra Club spokesman Oliver Bernstein called the ruling "unfortunate."
"It's really going to take a comprehensive effort to end this type of mining altogether," Bernstein said. "We are glad that the Obama administration is really giving a close look to mountaintop removal coal mining, but we are still waiting to see decisions that actually end this practice altogether."
Bernstein's comments came a day after the Sierra Club criticized the Obama administration for allowing the Army Corps of Engineers to issue a mountaintop removal mining permit in southern West Virginia.