The case alleges BNSF violated federal law by allowing coal dust, coal chunks and other pollutants to spill into protected waterways.
BNSF trains carry coal from the Rockies through Spokane to Seattle and along the Columbia River Gorge to an export terminal in British Columbia.
US District Court Judge John Coughenour denied BNSF's motion to dismiss the case.
The railroad company argued the environmental groups did not give sufficient notice and did not have proper standing to sue.
The environmental groups, including the Sierra Club, Puget Soundkeeper Alliance and RE Sources For Sustainable Communities, say coal and coal dust fall off the railcars when coal trains pass through rough tracks or are blown off during high winds or fast speeds.
They argue BNSF violated the federal Clean Water Act by discharging coal into local rivers without a permit.
The same groups filed a similar lawsuit against BNSF in federal court in Yakima, Washington.
In January, Judge Lonny Suko denied the BNSF’s motion to dismiss that suit.
That case is pending, but BNSF attorneys say in court documents that they plan to ask the federal court to consolidate both cases.
BNSF said the allegations were unprecedented and noted that no permit under the Clean Water Act had been issued or required by a regulator for the transport of coal by rail.