After drawn-out negotiations that were finally abandoned under the pressure of a secret court order, the Federal Election Commission has openly accused the AFL-CIO of persistently violating federal campaign spending laws.

Acting under a deadline imposed by U.S. District Court Judge George L. Hart Jr., the FEC filed a lawsuit late Friday asking for an injunction against the huge labor federation and a civil penalty of $10,000.

The FEC charged that the AFL-CIO has been illegally transferring funds from its general union treasury to a political contributions fund maintained by the federations Committee on Political Education (COPE). By the commission's estimate, more than $392,000 in general union funds has been funneled to COPE's Political Contributions Committee since 1970, and the practice is allegedly continuing.

A court decision in the FEC's favor could seriously blunt organized labor's influence in Federal elections. The commission said it filed the suit only after weeks of extensive negotiations proved fruitless.

The showdown was prompted by a series of broader complaints submitted to the FEC last winter by the National Right to Work Committee, a conservative organization that describes itself as opposed to compulsory unionism.

The Right to Work Committee maintained that COPE had spent more than $3 million in 1976 alone, much of it on behalf of the Carter-Mondale ticket. Although COPE said the funds were spent on non-partisan activities such as voter registration and get-out-the-vote drives, the Right to Work Committee contended the spending actually constituted partisan and illegal campaign contributions coordinated with Democratic and Carter campaign officials.

The Right to Work Committee pointed out, for instance, that COPE reasearch director Mary G. Zon was reported to have spent three days a week last fall at Carter campaign headquarters in Atlanta "to keep the Carter campaign and organized labor advised of what is doing." In addition, Alexander Barkan, COPE's national director, has served simultaneously on the Democratic National Committee's campaign steering committee.

In its initial complaint to the FEC on Dec. 20, 1976, the Right to Work Committee also contended that $600,000 had been transferred in 1975 and 1976 from the AFL-CIO general treasury to COPE's "education fund" and that $385,000 of it was turned over to the political contributions committee.

"That's laundering funds, in simple terms" a committee spokesman said yesterday.

Under federal election laws, labor unions and their political committees are supposed to get the money for voter registration drives and political donations through voluntary contributions by union members. The funds are supposed to be kept separate from general union treasuries, which are fed by union dues.

In its lawsuit, the FEC said it tentatively concluded in August that the AFL-CIO had violated the law in it s money transfers and finally began confidential efforts at "conciliation and persuasion" on Nov. 1.

This involved "extensive negotiations at which time proposed agreements were exchanged, but failed to result in an agreement, acceptable to the commission," the FEC said.

The Right to Work Committee had been in court since May, accusing the FEC of inaction in the case. On Nov. 18, in an order kept under seal at the FEC's request, Judge Hart told the commission either to sue the AFL-CIO within 30 days or announce that it was dropping the case.

An aide to FEC Chairman Thomas E. Harris, former associate general counsel to the AFL-CIO, said Harris had disqualified himself from the case and could not explain why confidentiality was sought for Hart's order, but a commission spokesman maintained that it was virtually required under an FEC rule calling for confidentiality in its investigations.

The election commission made no mention in its lawsuit of the broader charge of illegality underlying all COPE spending or of a subsequent Right to Work Ommittee complaint attacking COPE membership rosters and solicitation practices. Right to Work Committee President Reed Larson said the committee is considering filing its own lawsuit.