Former Rep. Edward A. Garmatz (D-Md.), a 13-term congressman who retired in 1973, was indicted by a federal gand jary today on charges of conspiring to take $15,000 from officers of two East Coast shipping concerns in exchange for sponsoring legislation worth $24 million to those firms.

The indictment, which was voted inside the new $23 million federal courthouse here that bears Garmatz's name, also charges the 74-year-old former legislator with soliciting an additional $10,000 payment from one of the shipping firms. Subsquently, the indictment charges. Garmatz took steps to cover up the alleged bribes.

In a statement issued today shortly after the release of the indictment. Garmatz denied the charges "unequivocally and without reservation." He added, "I assure my many friends that I did not abuse their confidence or violate the public trust."

Garmatz said he had retained Arnold M. Weiner, the attorney currently representing Gov. Marvin Mandel in a separate political corruption case, being tried in the same courthouse, to defend him. "I am confident my innocence will be established in the proceedings to follow," he said.

Today's indictment charged that Garmatz, who was chairman of the House Merchant Marine and Fisheries Committee for six years, received a $4,000 payment from the shipping firms sometime between 1971 and 1973.

In addition, Garmatz was the intended recipient of another $11,000 payment from the companies, a payment funneled through the chief clerk of his committee, according to the indictment.

The clerk, Robert McElroy, died in 1974.

In return for taking bribes from Moore-McCormack Lines Inc. and United States Lines Inc., the grand jury said. Garmatz sponsored legislation in 1972 that, following its passage, allowed Moore-McCormack to sell two passenger liners for $20 million and United States Lines to sell one vessel for $4 million.

In a proxy statement issued last April, Moore McCormack Lines Inc., a subsidiary of the Connecticut-based firm Moore McCormack Resources, informed its stockholders that the firm and some of its officers were under investigation by federal officials.

"No funds of (either the subsidiary or its parent company) were involved," the proxy statement said, and it noted that the firms and the officers involved had been cooperating with the grand jury investigator.

The grand jury indictment charged that James R. Barker, the chairman and chief executive officer of Moore McCormack Lines, made a $10,000 payment intended for Garmatz. Neither Barker, nor his firm is charged with any crime in the indictment handed up today.

According to Marvin Chatinover, director of corporate relations for Moore McCormack, Barker testified before the grand jury in Baltimore that voted the Garmatz indictment.

No corporate officials of United States Lines Inc. could be reached at their New York offices late this afternoon.

Today's indictment grew out of a two-year investigation by federal prosecutors in New Jersey into alleged corruption in the maritime industry. Two assistant U.S. attorneys from New Jersey recently presented their case to the grand jury here.

Garmatz is the latest in a line of Marylanders to be charged with political corruption.Prosecutions dating back to 1968 have resulted in the convictions of a congressman, a U.S. senator and two county executives.

The legislation Garmatz is accused of pushing in return for the payments exempted four shipping firms from federal laws that prohibited the sale to non-U.S. firms of some of their passenger liners.

The 1972 legislation passed by Garmatz's subcommittee allowed Moore McCormack to sell two money-losing liners, the S.S. Brasil and the S.S. Argetina to a company based in the Netherlands, even though the boats were constructed with the aid of federal subsidies.

The same bill allowed United States Lines to sell the S.S. United States for $4 million back to the federal government, which has kept it in mothballs in Norfolk, Va.

According to the indictment, Moore McCormack enterd into a contract with the Dutch firm on Feb. 12, 1971. The contract, which called for a $20 million payment to the shipping firm, was conditioned upon legislation being passed by Congress exempting the two ships from the federal restrictions. The legislation passed in 1971.

Also named in the indictment as a shipping official who gave Garmatz money was Edward J. Heine, president of United States Lines Inc. Heine also is not charged with any crime in the indictment. He couldn't be reached for comment today.

Before ending his 25-year congressional career, Garmatz was considered a political untouchable in his East Baltimore district. Although he cited health reasons for his retirement, he was expected to face still competition because of the reapportionment of his district and the popularity of his announced opponent, then-Congressman - now Senator - Paul Sarbanes (D-Md.).

An electrician by trade, Garmatz worked his way through the dominant political organization in East Baltimore and was rewarded in 1947 with an appointment to fill the unexpired term of Thomas D'Alesandor Jr., who had just been elected to his first term as Baltimore mayor. During his years in Congress, Garmatz became an expert on maritime matters, issues dear to many of his constituents who worked for the Baltimore port.

His connection with the maritime industry had caused problems for him in the past. In 1970, two West Coast shipping firms were fined $50,000 each for making an illegal corporate contribution of Garmatz's campaign through a group called "Pacific Coast Committee for Re-Election of E. A. Garmatz."

Garmatz, while conceding that he accepted the contributions, denied any wrongdoing. He was never charged in connection with the contributions.

At present, Garmatz holds down two consultants' jobs, one with Baltimore Gas & Electric Co. and one with the Maritime Institute of Technical and Graduate Studies, a Baltimore based school where merchant seamen take one-month courses to expand their professional abilities.

The institute is sponsored by one of the strongest of the maritime unions, the New York-based International Organization of Masters, Mates and Pilots. An official of the institute said yesterday that he did not know what Garmatz's exact duties were, but that "he works with" the institute's director on administrative matters.

A spokesman for Baltimore Gas & Electric said that Garmatz works on an "as-needed" basis as a consultant and lobbyist. The former congressman was registered as a BG&E lobbyist in 1973, but his name does not appear on more recent Congressional lists of lobbyists.

Garmatz lives in a quiet neighborhood of one-family homes in northeast Baltimore. Neighbors there were reluctant to talk to reporters, saying only that Garmatz was "a sweet man" who spent much time vacationing in Miami.

The Garmatz legislation also benefited two other shipping firms. Grace Lines Inc. and American Export. However, Jonathan Goldstein, U.S. attorney for New Jersey, emphasized that nothing had been found in the investigation linking these firms with any illegal activity.

Early this evening, an older man believed to be Garmatz answered the door at the former Congressman's home and said Garmatz was not in.