A federal grand jury yesterday indicted Washington lawyer William A. Borders Jr. and U.S. District Judge Alcee L. Hastings of Miami on charges that they conspired to take a $150,000 bribe to reduce prison sentences and fines for two brothers convicted of racketeering.

In a four-count indictment returned in Miami, the grand jury alleged that in mid-September, Borders took $25,000 in "up front money" from an undercover FBI agent posing as one of the convicted men.

On Oct. 6, less than three weeks later, the indictment says, Hastings ordered the return of a "substantial portion" of more than $1 million in property that he earlier had ordered the brothers to forfeit.

On Oct. 9, the same FBI agent allegedly paid Borders the remaining $125,000 in the parking lot of an Arlington motel, according to the indictment. Immediately after the payment, Borders, a member of the District commission that selects local court judges, was arrested.

The grand jury also charged that Hastings, 45, who was appointed to the federal court in 1979 by former president Jimmy Carter, told Borders the substance of his order reducing the property forfeiture before it was issued, and then gave Borders advance notice of when the order would be filed.

According to the indictment, Borders then passed that information on to the FBI undercover agent posing as Frank Romano, who along with his brother Thomas Romano, had been sentenced by Hastings.

The grand jury said that Borders then instructed "Frank Romano" to withdraw an appeal of the conviction, which had been filed earlier.

In charging the lawyer and judge with conspiracy to commit bribery and obstruction of justice, the grand jury indictment alleged that the actions by Borders and Hastings were done to "manipulate and interfere with the judicial process . . . for the purpose of advancing their own private interests."

Each offense carries a maximum penalty of five years in jail, a $10,000 fine or both upon conviction.

Borders, 42, well known as a defense lawyer in Washington's federal and local court systems, was also charged separately with two counts of interstate travel to commit bribery, which also carries a maximum penalty of five years in jail and a $10,000 fine.

Borders has consistently declined to comment publicly on the allegations against him, except to enter a formal plea of not guilty at his arraignment in October. Hastings, however, has repeatedly denied the charges and has accused the Justice Department of conducting an investigation "replete with overzealousness, lies, innuendoes, misquotes, inaccuracies and media leaks."

In a statement issued to the press last month, Hastings said that "at the very most you could indict me; you could never convict me."

Neither Borders nor Hastings could be reached last night for comment.

On Oct. 12, Hastings voluntarily removed himself from all cases before him pending resolution of the allegations against him.

Borders, who was released on a $25,000 bond after his arrest, temporarily stepped aside from his position on the D.C. Judicial Nomination Commission, a seven-member panel that screens and selects candidates for the D.C. Superior Court and the D.C. Court of Appeals. The commission also selects the chief judges of both courts.

The temporary departure of Borders from the prestigious commission came just four months after a federal judge in Washington said that President Reagan had exceeded his authority when he tried to replace Borders with a new member selected by the Republican administration. Carter appointed Borders to a five-year term on the commission in 1980.

The indictment yesterday climaxed an elaborate investigation, approved at the highest levels of the Department of Justice, which began last July after an informant in an unrelated case told federal law enforcement officials that Hastings was soliciting bribes from defendants who had appeared before him in criminal cases, according to knowledgeable sources.

The informant, who had been a client of Borders, alleged that Borders was acting as a so-called middleman who would accept the money for Hastings, the sources said.

The sources said that the informant alleged that Borders had asked him last March to approach the Romano brothers and tell them they could avoid going to jail if they paid a $150,000 bribe.

The Romano brothers were awaiting sentencing before Hastings after a jury convicted them on charges of misappropriating $1 million from a New Jersey Teamsters Union pension fund.

According to law enforcement sources, the informant never discussed the alleged bribe offer with the Romano brothers. On July 8, Hastings sentenced the Romanos to three years in prison and ordered them to forfeit $1.2 million in property. The brothers appealed the conviction and remained free on bond.