Federal regulators issued emergency rules Tuesday requiring extensive tests on crude oil moving by rail, concluding the system had become "an imminent hazard to public health and safety and the environment."

The order is aimed at operations in one of the U.S.'s booming oil fields, the Bakken Shale in North Dakota, where production has...