THANKS TO A SERIES of maneuvers so maladroit as to be almost unbelievable, the Carter administration is now confronted with serious questions about the integrity of the Department of Justice. The routine replacement of a U.S. attorney has been made to appear as if it were part of a major scandal. And a partial victory over the Senate on the merit selection of judges has been made to look as if it were an undercover deal to institutionalize political patronage. As a result, what would have been a proforma hearing on the nomination of Benjamin R. Civiletti to be deputy attorney general has become a wide-ranging inquiry into the way the Department of Justice is operating. The longer the inquiry goes on, the worse those operations look. The evidence so far does not demonstrate that the department is actually lacking in integrity. But it does suggest the department lacks some other qualities that you would pretty much count on finding in the government's law-enforcement agency.

Start with the affair of David W. Marston, who was removed as the U.S. attorney in Philadelphia. Everything Mr. Marston has done since his removal indicates that Attorney General Griffin Bell was correct in his decision last spring that Mr. Marston, a last-minute patronage appointee of the Ford administration, ought to be replaced. Before that decision could be carried out, however, Mr. Marston had embarked on an investigation of two congressmen who were pushing to get him out of the office and had become a popular hero in Philadelphia for his pursuit of public corruption. Those two facts made removing him a delicate matter. But President Carter and Mr. Bell went ahead without a second thought, spurred on by still another telephone call from one of the congressmen. Their explanation subsequently was that they didn't know about the investigation. That lack of knowledge would be incredible except that it squares with the other things that are coming out about the department's internal operations. You would think that the attorney general and the president would be told about any investigation of a congressman if only to protect them from publicly collaborating with someone about to be indicted. But not in this administration.

In any event, neither the White House nor the Department of Justice seemed to understand its problem. Misleading information was provided about the ouster, and material was excised from various documents because its publication might appear to be embarrassing. The result is that it looks as if Mr. Marston had been removed to stop the investigation, and as if that seeming obstruction of justice was then clumsily covered up. We don't believe that's what happened; it would cut against the entire public record of both the president and the attorney general. But neither of them seems to grasp the fact that the way the matter has been handled gives plausibility to such a conclusion. Indeed, the Department of Justice is now under tremendous pressure to prosecute the congressman, whether or not the evidence justifies it, to disprove the accusation.

Now consider the president's effort to move toward a merit system for selecting judges and prosecutors on the basis of merit. The deal the attorney general or the president (or both) made with Sen. James O. Eastland (D-Miss.) gave the president part of what he had promised during the campaign by taking appellate judges out of the patronage system. Given the stranglehold the Senate has had on those selections in the past, that was no small triumph. But by providing misleading information and squirming around on the issue, the administration has made it appear to the public that it was the president who gave up something and that he has turned his back on merit selection in favor of patronage.

What is going on here, anyway? If the Justice Department has mangled these relatively simple matters, how many other matters of greater moment have been similarly mishandled? What is lacking in that department's operations, it seems to us, is elementary political acumen. Sooner or later, the attorney general has got to come to grips with the fact that managing the Department of Justice is more than just deciding legal questions. It also involves a sensitivity to appearances and an awareness of the important role the department has in protecting the president from certain pressures and unwitting, but costly, errors. It's matter - to use the president's favorite term - of "competence."