In the wake of the Ginsburg fiasco, President Reagan ought to take two useful steps. He could begin by firing that consummate bungler, Attorney General Ed Meese.

What a mess! If Meese had done his job, the president's first nominee, Robert Bork, would now be sitting on the court. Meese failed miserably to comprehend the virulent nature of the opposition. While he slumbered, Bork's liberal foes went to work. The nomination went down the tubes.

Meese's next happy contribution was to insist upon the nomination of Douglas Ginsburg. The president has no expertise in jurisprudence; he was totally dependent upon Meese's judgment and advice. As events proved, Meese's judgment was terrible and his advice was worse.

It was not that Ginsburg, at 41, was unforgivably young. William O. Douglas went on the court at 40, Potter Stewart at 43, Byron White at 45. Neither was it of critical importance that Ginsburg had served for barely a year on the U.S. Court of Appeals for the District of Columbia Circuit. These reservations could have been surmounted.

Ginsburg was doomed by all the other biographical details that began to pile up. It transpired that Ginsburg had dropped out of Cornell to found a computerized dating service. He married an antinuclear activist; that marriage ended in divorce. Subsequently he married Dr. Hallee Morgan, an obstetrician. It had nothing to do with Ginsburg's judicial qualifications, but it developed that as a resident physician, Dr. Morgan had performed two abortions and assisted in a third.

In 1968 Ginsburg actively supported Robert Kennedy's candidacy for president. In 1975 he became law clerk to Supreme Court Justice Thurgood Marshall and drafted opinions for him. He joined the faculty of Harvard Law School; his students rated him poorly as a teacher. Ginsburg is a Jew -- that fact figured in Meese's calculations -- but he is not actively a Jew.

In the 1980s he acquired nearly $140,000 in stock of a Toronto company that operates cable television in Canada and in six states in the United States. As an assistant attorney general in 1986, Ginsburg drafted a brief for the Justice Department in a case involving cable TV. Later in the year he became a circuit judge. Since then he has written a dozen opinions for the court, none of them of much importance. All this dribbled out.

Then came the bombshell disclosure that in the 1960s and on a few occasions in the 1970s, Ginsburg had smoked marijuana. The last such incident occurred when he was a professor of law. Reagan had described his nominee as ''a man who believes profoundly in the rule of law.'' Across the nation arose a chorus of haw-haws: ''We always knew the Supreme Court was going to pot . . .'' ''Well, Ginsburg is just right for the high court . . .'' When the country starts to snicker at a public figure, the public figure is done for. Ask Wilbur Mills or Wayne Hays. Ask Gary Hart. Ask Joe Biden.

Meese blundered. That is the long and the short of it. He foisted upon the president a nominee who could be depicted as the ultimate bearded hippie of the '60s. The caricature is cruel and untrue -- in many quarters Ginsburg is highly regarded -- but in this town perception counts for more than reality.

How could Meese have done this to the president? The attorney general is not the brightest guy who ever served in that position; he had to survive an investigation of his personal finances by an independent counsel before he could take the job. Now he's up to his ears in the Wedtech affair. He's an embarrassment. Surely a good adviser would have spared his party and his president this galling humiliation.

The word around Washington is that Reagan is ready to try one more time with Judge Anthony Kennedy of California. Every friend of the president will pray that Ed Meese keeps his clumsy hands off.