The Justice Department is withdrawing its round-the-clock protection of a key - and threatened - witness in a major investigation of waterfront corruption because the bodyguards cost too much.

Deputy Attorney General Benjamin R. Civiletti said yesterday that the government is looking for a less expensive way to guard Joseph Teitelbaum, a Miami shipping agent who permitted FBI undercover agents to use his office to make payments to waterfront union officials.

The shipper has refused to enter the federal "witness protection" program, which relocates persons under assumed names, Civiletti said.

Teitelbaum's cooperation was vital in making racketeering cases against 10 officials of the International Longshoremen's Association and a dozen shipping executives, Justice officials said.

Arrests in the case Thursday ended the first phase of the extensive federal effort to end an alleged pattern of payoffs and kickbacks from shipper to longshoremen officials to ensure labor peace. The investigation is continuing imports from Norfolk to New York.

Civiletti emphasized that the 24-hour-a-day U.S. marshalls protection for Teitelbaum will not be cut off until some other arrangement is made to safeguard him.

But other Justice Department officials expressed concern yesterday about the impact that even reports on the decision will have on other potentially cooperative witnesses.

"There's no way the government can cut this guy loose," one official said. "But the mere fact it's out could make people who might 'go with the feds' wonder whether we'll just use them until we get an indictment. That's deadly."

The indictment made public Thursday shows that Teitelbaum and an FBI undercover agent were threatened early last year.

Details of that threat could not be learned. But on another occasion investigators learned that a crane operator in Teitelbaum's waterfront warehouse was approached and offered $50,000 to "drop a large crate on his head," sources said.

The round-the-clock protection started last fall, according to Civiletti. "He is an important witness. But that kind of coverage is rarely done and then only temporarily," he said. "He's (Teitelbaum) been under it for seven or eight months.

"I agreed with the marshalls service that the round-the-clock protection ought to be stopped. It was eating up their budget."

Civiletti said he didn't recall the cost for Teitelbaum's protection. But another Justice official said it had come to at least "a couple of hundred thousand dollars."

As many as 17 marshalls have been assigned to guard the shipping agent, working in shifts, sources said.

Adding to the marshals' discomfort about guarding Teitelbaum is his unwillingness to alter his life style, Justice officials said.

The day the indictments were disclosed in Miami he was filmed by network television crews walking around the yard of his firm. He also is known to walk out and pick day workers from groups of unknown men who show up at the gates of his company.

Civiletti suggested yesterday that Teitelbaum's security problem may be solved by some "mix" of private and government bodyguards or his entry into the witness protection program.

A Justice Department official from the organized crime section in Washington traveled to Miami yesterday as part of the effort to find alternatives to the 24-hour-a-day safeguarding.

Civiletti noted that the danger to Teitelbaum is being reassessed now because he's "in the spotlight." Public acknowledgement of the role of a witness usually means additional protection, he said.

Teitelbaum's name is referred to repeatedly in the 128-page indictment usually in the context of having made payoffs to union officials in the Miami area. He is also considered an important witness because he testified about dealings with union officials that took place before the undercover FBI agents were in place posing as shipping company employes.

Sources have said that Teitelbaum agreed to cooperate with the government after he was implicated in a plot to murder a business rival. He is said to have made his murder proposition to an FBI informer carrying a recording device.

Faced with a prospect of conviction, Teitelbaum in mid-1975 began to introduce the undercover agents to others in the waterfront industry. Investigators say that his cooperation was a turning point in what has become one of the government's largest investigations of racketeering.