The Justice Department said yesterday it will investigate how tens of thousands of customers who had signed up for MCI Communications Corp.'s long-distance service were erroneously assigned to American Telephone & Telegraph Co.

The investigation was prompted by MCI, which told the Department of Justice that AT&T was "actively interfering" with the equal access presubscription process.

"We have furnished you with evidence indicating thousands of bogus AT&T presubscription orders from all regions of the country," MCI stated in a filing with the antitrust division of the federal agency.

As a result of the breakup of the Bell System, phone customers are now being urged by long-distance competitors of AT&T to sign up for the new "equal access" service that eliminates lengthy codes customers had to dial to reach services other than AT&T. The process is expected to be completed by the end of 1986.

While conceding that there were errors in some long-distance orders, AT&T spokeswoman Edith Herman said the problem was solely because of a computer programming error and flatly denied that AT&T intentionally misassigned customers.

"It's ridiculous to say this was an intentional move. Why would we want to alienate customers?" she said.

Justice Department sources said the investigation is expected to take less than six months. If it is concluded that "AT&T is impeding the equal access process, it will be presented to Judge Harold H. Greene," who presided over the breakup of the Bell System, said one official who asked not to be identified.

"The most serious error uncovered to date -- at least 61,000 false AT&T orders submitted to the Nynex regional Bell operating companies -- may well reflect AT&T practices since the equal access process began 10 months ago," the filing said.

AT&T confirmed there had been a problem with orders at the New York-based Nynex companies as well as in Bell South Corp.'s territory. Bell South, based in Atlanta, serves the Southeast.

It is up to long-distance companies to verify either by telephone or in writing that a customer wishes their service. The long-distance companies then notify the local telephone companies, which complete the process of providing customers with the "Dial 1" long-distance service of their choice.

"The problem was a programming error which caused the computer tapes that were sent to Nynex to be erroneous," said Herman. "We then sent corrective tapes," she said.

Herman said only about 19,000 business customers who may have more than one line were affected. The problem "could crop up in other places, but I think it is corrected," she added. MCI officials disagreed that only business customers were affected and said residential customers also had been erroneously assigned to AT&T.

John Quinn, a spokesman for New York Telephone Co., a Nynex company, said that the local company had received incorrect information from AT&T because of an AT&T computer software problem. Quinn said the problem was brought to the company's attention at the end of April, when customers called to complain. About 11,000 misallocated lines were involved, he added. Another Nynex company with the same problem was New England Telephone Co., he said.

"AT&T informed us there are other telephone companies that are also probably affected by this," said Bob Bellhouse, equal access project manager with New York Telephone Co. "It occurred in a single AT&T computer installation which handles a number of local telephone companies in the Northeast. Customers of other long-distance companies as well as customers who never made a choice could be involved," he said.

A spokesman for MCI said, "The phenomena is nationwide; AT&T is engaged in a host of things that are false or misleading." However, MCI said AT&T was cooperating to resolve the problem, and "it is premature to say it is premeditated."

MCI said it had first discovered the problem when it compared a computer printout of AT&T customers with a computer printout of MCI customers and discovered duplicate customers.

"We called those customers and they never contacted AT&T," said Nate Kantor, president of MCI's Northeast division.

In its Justice Department filing, MCI asked the agency also to investigate local company order processing practices that, the company said, were inefficient.