Six years ago, Supreme Court Justice William J. Brennan Jr. appeared to his friends to be a tired 73-year-old -- despondent, frail, and thinking about retiring.

Today, quitting is the last thing on his mind. Brennan is his ebullient former self -- working the crowd at a reception, dancing the night away at a party, traveling to Europe and around the country. His face shows new color; his frame, his handshake and his voice, new robustness.

Now, his friends talk not so much about his retirement, but the "renaissance" of Justice Brennan.

The rejuvenation of Brennan could not have come at a more opportune time as far as liberals are concerned. The court is under persistent attack by President Reagan and Attorney General Edwin Meese III.

The attacks are receiving increased attention because Brennan, and more recently, Justice John Paul Stevens, appear to be fighting back in speeches of their own. Such exchanges -- direct or indirect -- between an administration and Supreme Court justices are rare, particularly for Brennan, a low-profile, behind-the-scenes court consensus builder all his life. The central topic of the debate -- how strictly courts must adhere to the specific intentions of the 18th-century framers of the Constitution -- is as old as the court itself and fundamental to the role it plays in the American scheme of government.

More importantly, Brennan's allies off the court and out of government are counting on him to continue leading the resistance within the high court itself to erosion of the landmark civil rights and civil liberties precedents of the Earl Warren era, precedents which conservatives regard as prime examples of "judicial activism."

For five years, observers have been predicting that four or more vacancies would open on the court, giving Reagan the opportunity to reshape it well into the 21st century. So far there has been one vacancy -- Justice Sandra Day O'Connor replaced Potter Stewart, who retired.

Brennan's vigor suggests that he, like his 76-year-old ally, Justice Thurgood Marshall, will leave only when he has no choice.

Few still living have played as important a role as Brennan in creating and maintaining the Warren court legacy. He is viewed with grudging admiration even by those who disagree most strongly with his record.

"No individual in this country, on or off the court, has had a more profound and sustained impact upon public policy in the United States for the past 27 years," the conservative National Review has said.

Brennan's closest friends say his "dark period" came while Marjorie, his wife of more than 50 years, was gravely ill with cancer. Brennan, thoroughly devoted to her, went home every day at 4:30 p.m. to be with her during the lengthy illness. In addition, Brennan himself underwent treatment in 1978 for a cancerous tumor in his throat, and he suffered a mild stroke in 1979.

Brennan, noted for his geniality, for putting his arm around the shoulders of friends and casual acquaintances, stopped going out socially for several years before his wife died in 1982.

A year later, Brennan married his secretary of more than 20 years, Mary Fowler, now 70. "She is the whole reason he has had this renaissance," said one former clerk. The bounce is back in his step, several former clerks and friends noted, and those who have seen him recently say Brennan has put on weight -- despite daily stints on his exercise bicycle -- and is feeling "very feisty."

Brennan even consented for the first time to be interviewed last September for a public broadcasting program about the court.

When conservatives criticize the Warren court and the present one under Chief Justice Warren E. Burger, they single out Brennan as the archetypal "activist."

This role was not predicted when President Dwight D. Eisenhower appointed Brennan, then a New Jersey Supreme Court justice, to the U.S. Supreme Court in 1956. Brennan, the second oldest of eight children of an Irish immigrant, and the recipient of a scholarship to Harvard law school, was a former New Jersey labor lawyer -- on the side of business -- before going on the New Jersey bench.

He was never considered to be at the far end of the liberal spectrum during the Warren court years, but rather was the pragmatic coalition-builder, often in the center of a shifting activist majority with then-Justices Hugo Black and William O. Douglas to his left.

He made a major impact in that role. Brennan wrote the landmark 1964 opinion in New York Times v. Sullivan that the press could not be successfully sued for false statements unless those statements were deliberately made. In that case, Black, Douglas and then-Justice Arthur Goldberg argued that newspapers could never be sued for libel by public officials.

In 1962 he authored the famous Baker v. Carr "one man, one vote" ruling, which for the first time inserted the federal courts into what had previously been considered a purely political preserve. He followed with a series of rulings establishing rights for welfare recipients, illegal aliens and criminal suspects.

Black, Douglas and Goldberg are gone. The court has shifted to the right, leaving Marshall, and Brennan, often isolated.

While Brennan rarely dissented in the 1960s, he does so regularly now. Where he wrote ground-breaking rulings in the Warren Court, his task of late has been more to forge a coalition to limit erosion of those rulings under Burger.

This past July, Attorney General Meese, speaking to the American Bar Association, condemned some of the court's famous civil rights and civil liberties decisions, saying recent rulings on church-state separation "would have struck the founding generation as somewhat bizarre."

Meese said the justices should stick to the literal words of the Constitution and the intentions of its authors "as the only reliable guide."

No current Supreme Court Justice so clearly represents the judicial philosophy Meese took on in that speech; and Brennan, in his own speech Oct. 12 to teachers and administrators at Georgetown, appeared to be responding. Without mentioning Meese's name, Brennan said that such views were "arrogance cloaked as humility" and that they hid a political bias against the rights of minorities.

Brennan's remarks were widely interpreted as a veiled reply specifically to Meese. In fact, the speech was drafted in May, two months before Meese spoke, and the general topic was selected by Georgetown. According to sources, Brennan did not regard the speech as out of the ordinary, and reportedly was astounded at the attention it drew, since he felt he had said it all before.

Indeed, Brennan has been waging war against the Reagan-Meese-Burger judicial philosophy for years, particularly on the conservative idea that modern courts should interpret the Constitution as it might be interpreted by the document's 18th-century authors.

For example, in 1983 the court upheld the common practice in legislatures of having a chaplain say a prayer at the opening of a session. The court, in support of its decision in Marsh v. Chambers, noted that the first Congress in 1789 wrote the First Amendment; that the same Congress opened its sessions with a prayer; and that, therefore, the framers of the First Amendment's religious guarantees believed legislative prayer to be constitutional.

Brennan dissented. It is dangerous, he suggested, to let the acts of early Congresses be too much of a guide to 20th-century constitutional interpretation. There are certain "skeletons in the congressional closet . . . . " Brennan wrote. The First Congress, in addition to having prayers, required that those convicted of theft be "publicly whipped, not exceeding thirty-nine stripes." Another congress, in 1866, reaffirmed segregation in the D.C. public schools, one week after passing the 14th Amendment guaranteeing equal protection and due process to all, he added.

"We current justices read the Constitution in the only way that we can," Brennan said in his recent speech, "as 20th-century Americans. We look to the history of the time of framing and to the intervening history of interpretation. But the ultimate question must be, what do the words of the text mean in our time."

Brennan always loved a good scrap, his friends say. But during the years of his unhappiness, court observers wondered whether he was still up to it, noting, for example, how subdued he often was during oral arguments at the court, one of the few forums where outsiders can watch the justices at work.

Brennan now appears livelier there, regularly joining in the often sharp questioning on issues he cares about, such as the constitutionality of religious clubs in the public schools.

And the last term, Brennan's 29th, was in many ways his most satisfying in recent years as the court narrowly rebuffed Reagan administration efforts to lower what Jefferson called the "wall of separation" between church and state.

Now, few doubt that William J. Brennan Jr. is back in fighting form.