Jerry Irvine, spokesman for the Washington Suburban Sanitary Commission, said about 10,000 customer accounts were affected.
The commission said the advisory is precautionary, and affects residents in Accokeek and parts of Fort Washington and Piscataway.
An interactive map on the commission's website lets customers pinpoint whether they are included in the advisory.
The commission said the water main broke Tuesday night, but darkness and Tuesday's heavy rains had made it difficult to identify the broken pipe.
Those under the advisory were urged to bring water to a rolling boil for one minute before drinking it, making ice, washing dishes by hand, brushing teeth or preparing food.