Rep. Frederick W. Richmond (D-N.Y.) resigned from Congress yesterday and pleaded guilty to income tax evasion, possession of marijuana and arranging illegal payments to a federal employe.

Richmond, a millionaire who has represented Brooklyn in the House since 1974, stood silently as the government entered into the record in U.S. District Court in Brooklyn a list of six other crimes for which he was being investigated, ranging from buying cocaine to aiding a fugitive.

He said in a statement afterward that his actions had been "irresponsible, unnecessary, foolish and wrong," adding that he was pleading guilty on "the basis of the counsel of my conscience."

As part of the plea bargaining agreement he agreed to withdraw from this fall's reelection campaign. Richmond, 58, who as chairman of the House nutrition subcommittee has been for the past two years Congress' most vocal proponent of the food stamp program, could face up to seven years in prison and a $20,000 fine at his Nov. 12 sentencing.

Prosecutor Edward R. Korman, assistant U.S. attorney for the eastern district of New York who left office himself yesterday, said, "Basically this is a tragic occasion. Congressman Richmond in many ways is a tragic figure."

Korman said the government had agreed not to prosecute the congressman on several other potential charges:

* The purchase of cocaine and marijuana. No other details were given, but sources said several Richmond staffers testified before a grand jury about buying him drugs.

* Purchase and sale of stock in several companies by Walco National Corp., which he founded, and another person.

* Aiding Earl Randolph, an acquaintance whom Richmond helped get a government job in early 1981. Randolph was serving an 18-year sentence for assault with intent to kill in 1980 when he escaped from a Massachusetts halfway house through a third-floor window.

Six months later, aided by Richmond's recommendation, he went on the House payroll under an assumed name. Records show that Randolph worked in the House folding room the first two month of 1981. The congressman said he did not know Randolph was a fugitive.

In March, 1981, after leaving the House job, Randolph was arrested in New York City on male prostitution charges that he solicited an undercover policeman in the back seat of a car belonging to the congressman.

Richmond's receipt of a Walco pension in violation of the House rules limiting outside income.

Filing false financial disclosure statements.

Campaign law violations. Sources said the grand jury was investigating whether Richmond used Walco personnel illegally in his 1978 and 1980 reelection campaigns.

Democratic Party leaders in New York had refused to support Richmond in his plans to run for a fifth term, but he filed for the Sept. 23 primary anyway. As part of the deal with the government, he agreed to try to get his name taken off the ballot and if that is not possible to announce he is not seeking reelection.

He also said he would take "whatever legal steps are necessary to ensure he will not serve in the event he should be renominated and reelected."

New York law gives the governor authority to call a special election to fill a vacancy, but not this late in the year. Thus Richmond's Brooklyn district will be without a representative until January. Two other Democrats had filed to oppose him in next month's primary.

His district, which includes the renovated areas of Brooklyn Heights as well impoverished neighborhoods of Bedford Stuyvesant, is 50 percent black and 23 percent Puerto Rican. It is overwhelmingly Democratic.

The plea agreement does not bar Richmond from seeking to regain his seat after this fall's election. But an aide said yesterday, "I very, very seriously doubt that he's thinking about running for public office again."

The House Committee on Standards of Official Conduct announced it was dropping its investigation of Richmond's conduct because of the resignation.

Richmond has faced public controversy over his personal and business affairs for the past four years. In 1978, he was arrested in Washington on charges of soliciting sex from a 16-year-old boy and an undercover police officer.

The parents of the boy complained he had been propositioned while delivering groceries to the congressman's home. The charges were dismissed after Richmond agreed to seek professional counseling under the D.C. government's first-offender program.

In 1979, a federal judge in St. Louis ruled that Richmond had "feigned" retirement from Walco, the steel and tool holding company he founded, so he could get a $100,000-a-year "pension" and other benefits that violated congressional limits on outside income.

Despite his problems, Richmond's constituents returned him to office with resounding majorities. He won 77 percent of the vote in 1978 and 76 percent in 1980.

For the last several months, new legal troubles have plagued Richmond. A federal grand jury in Brooklyn has been investigating a variety of charges about drugs, misuse of government and campaign funds and the tax consequences of his business activities.

His attorneys' plea bargaining negotiations with Korman were held up recently, sources said, when Justice Department officials in Washington wanted more charges added to the agreement to reflect the variety of Richmond's illegal conduct.

The sources said the original agreement between Korman and Richmond's attorneys was limited to resignation and a guilty plea to a three-year tax charge. The agreement yesterday raised the tax charge to a five-year felony and added two one-year misdemeanor counts, the marijuana possession charge and one of supplementing the income of a federal employe.

The final charge related to Richmond's arranging to have an associate pay $7,420 to a college to cover the tuition of the daughter of a Navy civilian employe. He told District Court Judge Charles P. Sifton that he helped the unidentified Navy worker "to show my gratitude for services performed for me and my staff."

The services included acting as a liaison between his office and the Navy and helping his office get information about potential business for the Brooklyn Navy Yard, he said. Neither the name of the federal employe nor the college was released.

In answer to a question by the judge about drug use, Richmond said, "In 1980 I was given a few marijuana cigarettes obtained from members of my congressional staff."

Under the plea bargaining agreement, the congressman waived indictment and agreed that Korman could file three tax evasion charges against him. The charges alleged that Richmond knowingly evaded paying more than $93,000 in federal income taxes from 1978 to 1980.

In return for a guilty plea to the third count -- covering evasion of $50,000 of taxes in 1980 -- the government agreed to drop the other two counts upon sentencing. The tax charge involves Walco's payment of expenses at his apartment in New York.

The agreement made it clear that the Justice Department still can seek to recover the money and any fraud penalties in a civil suit. Such a suit is likely, sources said.

As well, the letter on the plea bargaining from Korman to Richmond attorney Kalman V. Gallop said that the government is free to bring any of the allegations it had agreed not to prosecute to Sifton's attention at sentencing.