The Baltimore Gas and Electric Co. withdrew, unexpectedly yesterday to build a large coal-fired electricity generating plant with Potomac Electric Power Co. in Dickerson, Md., Pepco said yesterday.

In making the announcement, Pepco said it would re-examine its own plans for the facility and look at alternatives, including whether another utility company is interested in sharing the cost of construction.

Pepco and BG&E were to have shared equally the plant's 800-megawatt capacity. But BG&E said revised forecasts for demand showed no need for the capacity by 1987, when the suit would be completed.

BG&E's decision to withdraw from the project, with an estimated construction cost of $700 million came as the final contract document was being readied for signature.

The Dickerson generating plant was planned in the early 1970's. In 1977, BG&E and Pepco agreed to share equally in the ownership of the plant and to split the costs.

At the time the plant originally was planned, demand by Pepco's customers was growing at a rate of 8 to 10 percent a year. Following the oil embargo of 1973, however, demand dropped sharply and is expected to grow by less than 2 percent in the next 10 years.

In response to that drop in demand, Pepco cuts its construction program by more than $1 billion. Part of that scaling down was to turn the Dickerson venture into a joint venture with BG&E.

Pepco still expects to need the 400-megawatt capacity it would receive from the Dickerson plant in 1987, but has no need for the entire 800-megawatt capacity, a spokesman said.