U.S. Attorney David W. Marston of Philadelphia, who has been pressing investigations of official corruption involving Democratic officeholders, was ousted yesterday in a showdown meeting with Attorney General Griffin B. Bell.

At a slightly hectic news conference outside the Attorney General's office following the meetings, Marston said Bell told him flatly that "the decision to fire me is final."

The Attorney General phrased it somewhat differently, declaring in a two-page statement that Marston had "refused my request" to remain at his post until "when and if a suitable replacement could be found."

Marston maintained that this would have crippled his investigations, including one into the construction of a $65 million addition to Philadelphia's Hahnemann Hospital. That inquiry has given rise to allegations that two Democratic congressmen from Pennsylvania, Daniel J. Flood and Joshua Eilberg, may have profited from the project.

The controversy escalated to national proportions when President Carter acknowledged at a news conference this month that he agreed to expedite Marston's removal in a telephone conversation with Eilberg last Nov. 4.

"Nothing was said in there to change that," Marston said yesterday of his meeting with Bell."A congressman called the President of the United States and said, 'Get that prosecutor out of there' . . . He didn't have a candidate for the job. He just said, 'Anybody but Marston' . . . and that's why I'm gone."

As for Bell's request that he stay on temporarily, Marston said he didn't want to be "a lame duck U.S. attorney standing there with the official corruption cases in limbo (and) with defendants holding their breath, waiting for someone to pull the plug on the U.S. attorney."

A Republican appointee and former aide to Sen. Richard Schweiker (R-Pa.), Marston said he told Bell that he felt his performance justified his retention in office for a normal four-year term.

Bell, Martson continued, "didn't disagree with me. He simply said we have a system and he has to accept the system. I don't agree with that. You know, they had a system in Philadelphia, too, before I got there. And I didn't accept that system. I threw it out and eliminated politics" from it.

In his presidential election campaign, Carter had pledged to name judges and U.S. attorneys on the basis of merit alone, but Bell subsequently agreed to let the traditional system of congressional patronage prevail for presecutor appointments.

Schweiker, alluding sarcastically to Carter's campaign rhetoric, charged at a news conference last evening: "The presidential candidate who asked 'Why not the best?" has today, as President, arrogantly answered, 'Give them the worst.'"

Marston said he plans to leave his post Monday after a visit by Assistant Attorney General Benjamin R. Civiletti of the Criminal Division to assure federal prosecutors in Philadelphia that the Justice Department wants all investigations pursued with no loss of momentum.An acting U.S. attorney, possibly Marston's top assistant, Kirk Karaskiewicz, will be named by a panel of federal judges until the administration settles on a more permanent successor.

Bell declined to meet with reporters after the meeting, which lasted nearly two hours. But the Attorney General vowed in his statement that "there will be no let-up in the present approach or attitude toward public corruption."

Three Justice Department officials - Thomas Henderson, head of the Public Integrity Section; Michael Shaheen, head of the office of professional responsibility, and Russell T. Baker Jr., a top aide in the Criminal Division - had been dispatched to Philadelphia Monday "to assess the Marston problem" and all had briefed Bell before yesterday's showdown.

Two of them, Bell said in his statement, "see no harm to ongoing investigations or prosecutions from the removal of Mr. Marston. One believes there would be general harm in that the momentum against public corruption could be interrupted, without regard to any particular investigation being impeded."

Bell added that even this adviser, whom he did not name, did not foresee any "long-run" harm to any individual inquiry, in light of the fact that Allen Lieberman is in charge of the public corruption unit in the Philadelphia U.S. attorney's office, and has been since before Marston's appointment.

Bell said Marston was told yesterday that he would not be replaced unless his successor were "at least Mr. Marston's equal in ability, character and integrity" and unless Bell were satisfied personally "that no investigation or prosecution would be impeded, either specifically or generally."

Marston, however, said that it was clear he was being asked to stay on only for a short transition period and that Bell estimated it would last no more than three months.

"He said there was a great controversy in Pennsylvania," Marston recalled. "I said one way to remove that controversy, it seems to me, was to let me serve my four-year term. He said that was never an option . . . I'm very disappointed . . . A call from a congressman clearly expedited my removal."