The government ordered Bell Atlantic and Southwestern Bell last week to refund more than $8.5 million to long-distance telephone companies, saying the two firms exceeded their authorized profit margin in 1985.

The Federal Communications Commission, after investigating certain rates local Bell companies charged such long-distance companies as MCI, Sprint and AT&T for hooking into the local network, found four Bell Atlantic companies and two Southwestern Bell companies charged too much.

The extra revenue pushed earnings for the firms above their authorized rate of return at that time -- 12.75 percent.

In a unanimous decision, the FCC ordered Bell Atlantic's Chesapeake & Potomac Telephone Co. of Maryland to refund $1.513 million in overcharges; C&P Virginia, $1.875 million; C&P West Virginia, $454,981; and Bell Telephone Co. of Pennsylvania $2.399 million. The Bell Atlantic overcharges occurred between April 1 and Sept. 30, 1985.

Southwestern Bell of Texas was ordered to refund $1.806 million and Southwestern Bell of Oklahoma, $500,346, in overcharges that occurred between Aug. 1 and Sept. 30, 1985.

The Bell companies had no immediate comment on the order.

American Telephone & Telegraph Co., in line to get about 90 percent of the refund as the nation's biggest long-distance company, could not immediately say whether its rates would fall as a resul