Federal banking officials have told United Mine Workers President Sam Church Jr. that they intend to take away the union's control of the National Bank of Washington, a rare and drastic act in American banking.

Sources close to sensitive and highly confidential negotiations involving Church; his personal attorney, Harry Huge, and a committee of top federal banking officials said that earlier this week Church was threatened with a "cease and desist" order that effectively would have put the city's oldest and third largest bank under federal supervision.

The federal takeover threat resulted in a compromise document that was being drafted and redrafted yesterday as "articles of agreement" under which the union could lose the right to appoint a majority of the bank's board of directors.

This single provision of the agreement would take away effective control of the bank. In recent years, the union has exercised almost total control of appointments to the bank's 25-member board. The union owns 750,000 of the 1 million shares of NBW stock.

As drafted by federal bank officials, the agreement also calls for the union to find a new chief executive acceptable to federal officials and remove itself totally from the operations of the bank. Federal officials would also have veto authority over selection of directors and granting of stock dividends, a key source of income for the union.

Church was not available for comment and was reportedly in New York to meet with Deputy Secretary of Commerce Luther Hodges Jr. in an effort to lure Hodges to the bank's top post.

Hodges, reached in New York, said he is considering the job.

The federal action this week followed a series of Washington Post articles last week detailing conflicts of interest, unsound loan practices, abuses of authority and other questionable practices by some of the top offices and directors of the bank.

The articles showed that Church participated in some of those practices, though he had denied improper conduct in the past.

A 44-year-old former coal miner, Church has no formal title at the bank, but he currently presides as chairman of its board of directors and last month fired NBW president Dale L. Jernberg and two other senior bank officers.

During the week-long, behind-the-scenes drama, the bank's union owners have fought to keep federal regulatory officials from taking any action that would appear to criticize the conduct of union leaders.

But it was clear to sources close to the talks that the central focus of the federal action was the removal of Church from day-to-day control of the bank and, thereafter, the union's dominance of the board of directors.

Besides presiding over the board of directors, Church has set himself up as chairman of a special "oversight" committee that has been negotiating with a federal grand jury that subpoenaed the bank's records in July.

Church also controls the bank's executive committee which must approve all major loans and bank policies.

The bank is currently under investigation by the grand jury and the U.S. Securities and Exchange Commission. In addition, the D.C. Office of Campaign Finance is seeking records to verify allegations that the bank helped the 1978 mayoral campaign of Sterling Tucker circumvent D.C. campaign contribution laws.

To aid the grand jury investigation, the U.S. Comptroller of the Currency has detailed a federal bank examiner to work with assistant U.S. attorneys in the grand jury investigation.

During the busy week of talks, Church convinced the federal bank regulators to hold off on the cease and desist order and instead enter into "articles of agreement" with union and bank leaders. However, banking experts said yesterday that the provisions of the articles of agreement were actually more drastic that most cease and desist orders issued by the comptroller's office.

The articles of agreement are scheduled for presentation to a special meeting of NBW's board of directors called for Monday.

NBW stock, which is traded over the counter, dipped to its lowest point in recent history after sliding a quarter of its value -- a full eight points -- from $28 a share to $20 over the last 30 days.

Measured against a $42-a-share book value on the stock -- the amount each share would be worth if the company were liquidated tomorrow -- the $20-a-share level represents a serious erosion in investor confidence. The stock subsequently rallied and regained some of the lost value.

As a result of the stock slippage, the mine workers were forced to put up additional stock pledged as collateral on loans from other banks.

It was reported last week that the bank has $53 million in outstanding loans that have been criticized by federal bank examiners as having real or potential weaknesses, an amount eight times the bank's annual earnings.

Third quarter earnings posted by the bank last week show that its profits are down by a third compared with the first three quarters of 1979.

Hodges, whose father was governor of North Carolina and Secretary of Commerce under President John F. Kennedy, was chairman of North Carolina National Bank before he took his post in the Carter Administration.

The North Carolina bank is the nation's 23rd largest. By contrast, NBW is the 225th largest. Hodges said he would not consider the NBW job a step down in his banking career.

It was not clear yesterday how the agreement with federal officials will affect appointments to the NBW board that have been discussed in the past week by NBW directors.

Last week, the board received a list of prospective directors that included Rep. Robert N. Giaimo (D-Conn.), chairman of the House Budget Committee; John W. Hechinger, president of the Hechinger Co. in Washington; former White House aide Gen. Brent Scowcroft; Kenneth T. Blaylock, president of the American Federation of Government Employes; John H. Lyons, president of the International Association of Ironworkers; John W. Snow, a vice president of Chessie Systems Inc. and David B. Sykes, senior vice president of Giant Food Inc.