E. C. Ernst Inc., a major Washington-based electrical contracting and construction firm operating under Chapter XI of the bankruptcy laws, yesterday concluded an agreement to pay Citibank $15.6 million owed in pre-bankruptcy debt and to sell a subsidiary.

The agreement will eliminate $11 million in debt owed to Citibank and transfer the remaining $4.6 million to another creditor, according to a statement released by Ernst.

Citibank is Ernst's largest secured and unsecured creditor. The agreement was approved yesterday in U.S. District court in New York and is subject to certain closing conditions, Ernst said.

Ernst also said it will divest itself of L. K. Comstock & Co., which Ernst owned since June 1, 1978.

The agreement concluded yesterday would reduce Ernst's pre-bankruptcy debt to $28.3 million from about $40 million. When it first petitioned for protection under federal bankruptcy laws, the firm's debt was $52 million. That debt has been reduced through court-approved actions and payment of supplier claims which were protected by state liens or trust laws.

Ernst discontinued some international operations and trimmed back on domestic branches to concentrate on a regional business base last year. Company officials blamed previous financial woes on international contracts which have been described as an "unmitigated disaster" by an Ernst official.

Under the terms of yesterday's agreement, Ernst will transfer to Citibank its rights in an equal joint venture with L. K. Comstock on a $50 million electrical construction contract for a nuclear power plant in Perry, Ohio.

Ernst and Citibank may also jointly pursue an action against Saudi Tarmac Ltd./Tarmac Overseas Ltd. for funds "wrongfully paid under a Citibank letter of guarantee in connection with a project in Saudi Arabia," according to Ernst.

Both Ernst and Citibank agreed to dismiss all lawsuits, claim appeals and counter claims against each other resulting from their previous relationship.

Ernst is engaged principally in commercial and institutional electrical work. It has had overseas contracts in Central America, South America and the Middle East. The company resumed bidding for new business last August.