D.C. Superior Court Chief Judge H. Carl Moultrie I, head of the local trial court here for the last eight years and the court's first black chief judge, announced yesterday he has inoperable bone cancer but plans to remain in office until the end of his term in June.

Moultrie, 70, a former civil rights leader who headed the local NAACP during the 1968 riots, told a gathering of the court's 51 judges that his cancer had been diagnosed almost a year ago but that recent and increasing pain had prompted him to make the announcement.

"I have a sense of pride, and I wanted to announce it before anyone found out," Moultrie said in an interview Sunday at the Northeast home where he and his wife Sara live.

During the wide-ranging session, Moultrie looked back on a career spanning a period of great change in Washington, observed that the young defendants who now appear before his court strike him as hardened criminals with scant prospects for rehabilitation and said he would "like to see" a death penalty here.

"The most difficult thing about this whole thing is to sit back now and think your whole career could be cut short any second . . . " Moultrie said in the interview. "There are so many things in the way of laws for the city . . . . There are so many things that still need to be done, and you think, you think in terms that it could be a space of months that you are no longer involved; that's very frightening, very frightening. But you learn to live with it."

Moultrie privately told his staff of his illness Friday. He said in a statement released by the court yesterday that if he is unable to fulfill his duties at any time before his term expires, he will name an acting chief judge to serve in his absence.

Mayor Marion Barry called Moultrie a "revered personal friend of many years" and praised his "abiding interest in public service. Effi and I wish Carl and Sara to know that they are in our prayers and that we know their courage and faith will sustain them during this period."

"H. Carl Moultrie has been one of the most outstanding black leaders of Washington and indeed of the nation," said NAACP Executive Director Benjamin Hooks, who has known Moultrie as both the former president of the local NAACP chapter and as executive secretary of the national black fraternity Omega Psi Phi.

"Prior to joining the bench, he did much of the work that resulted in Washington, D.C., being a better place for all people to live," Hooks said.

Moultrie remained seated and spoke softly through a microphone yesterday as he described how his doctor first diagnosed in April that he had prostate cancer and later told him that surgery was not advisable. The cancer since has spread throughout his body, Moultrie said, and his doctors told him he had four months to 10 years to live.

"I accept the 10," he told the gathering, attempting to lighten the somber mood.

Moultrie said he had "no intention whatsoever" of not completing his term and said he expected to work as long as "physically possible."

"I asked them not to feel sorry for me," he said of the announcement, "that I had gotten over the depressing stages and was facing the situation the best I knew how."

After the announcement, Judge Fred Ugast said he was speaking for all the judges of the court when he told Moultrie that, more than being the court's leader, "You are our friend." Then, Moultrie said, a procession of judges approached him and "told me they were praying for me."

"That was the saddest part; it was very, very hard for me," said Moultrie, who was leaving to go into a hospital yesterday afternoon because of a complaint unrelated to his cancer.

The son of a minister, Moultrie first came into prominence locally when as a NAACP lawyer he brought the first police brutality suit against the city. Later, as president of the local NAACP chapter, Moultrie rode with then-Mayor Walter E. Washington through the city's streets during the 1968 riots, attempting to quell the disturbances and forging a long relationship with the mayor.

"I always remembered asking him to take on another committee," Washington recalled yesterday. "He was always saying he was too busy. I'd say, 'That's just why I need you.' He couldn't refuse and he never did . . . . He has served in so many areas in the community, not only as a member of the bar but as a great moderator and community leader."

During the Sunday interview, Moultrie spoke softly and laughed at times as he recalled a time when Barry headed the Student Nonviolent Coordinating Committee, D.C. Del. Walter E. Fauntroy led the Southern Christian Leadership Conference and he directed the local NAACP.

"They were considered the organizations fighting the establishment," he said. "Many people have mentioned recently, 'How do you guys feel now that they're fighting you all?' "

Moultrie, who was appointed to the court in 1972 by President Nixon, spoke of his disappointment that there appeared to be "more crime than ever" and that many of the "root causes but not excuses" that he fought as a community activist still exist in the city and the nation. But Moultrie said his experience as a judge has shown him that some people are just "damn mean" and that he would use the death penalty if it existed in the District.

"They don't give a damn," he said. "I'd like to see the death penalty . . . . Your life to them is nothing."

Moultrie presided over some of the city's most celebrated trials, including the case of Bernard C. Welch, who was convicted of murdering Washington cardiologist Dr. Michael Halberstam in December 1980. Known as one of the court's stiffest sentencers, he said he had come to place little faith in rehabilitation for most defendants who come before him. In particular, he said, he looked with least favor on those between 19 and 27 years old, almost always leveling the maximum prison sentence.

"He's just a criminal," said Moultrie of today's young offender. He added, though, that he treated those over 30 with more leniency. "They're not necessarily criminal . . . . Theirs is a one-time act."

Moultrie said there were few things that he would change in his life and that he looked with pride on his accomplishments at the courthouse, including increasing the number of judges from 44 to 51 and the number of commissioners from 1 to 10. But he said he was disappointed that cases still took a long time to wend through the system, saying that "justice delayed is sometimes justice denied."

He said quietly that he worried that he might not see the results of some things that are extremely important to him, such as a study of sentencing guidelines.

"God, I'd like to see what's going to happen there . . . . There are so many experiments we have put in that I'd like to see, but who knows, who knows? At least I have the satisfaction of knowing I was part of instituting it."

News of Moultrie's illness spread quickly through the modern courthouse yesterday. One judge, when asked about the announcement, turned his head to wipe away tears, saying, "He is a special man, a very special man." Another said it was "one of the grimmest and saddest things I've ever heard."

Other judges said they were heartened by Moultrie's decision to stay on the job and praised him for unifying the court's 51 judges. As often as not, these judges remarked on Moultrie's personal qualities as a friend or mentor, as someone who "always made an inquiring call when you or someone in your family was sick," as one put it.

"I have always aspired to be like him," said Judge Reggie Walton, one of the court's youngest judges. "When you find out an idol is sick, it hurts.