The troubled television star Charlie Sheen revealed his H.I.V.-positive status on Tuesday during a live interview with Matt Lauer on NBC’s “Today” show, saying that he wanted to put a stop “to this onslaught, this barrage of attacks.”

“I am in fact H.I.V.-positive,” he said.

Mr. Sheen said that he paid people “into the millions” to stay quiet about the diagnosis. “That is money taken away from my kids.”

Asked whether he faced lawsuits, Mr. Sheen said it was more “shakedowns” from people demanding money.

When Mr. Lauer asked whether Mr. Sheen was still paying some of these people, the actor replied, “Not after today, I’m not.”

Mr. Sheen said that part of his goal in coming forward was to put an end to the payments he was making to keep people quiet. “I think that I release myself from this prison today,” he said.

Mr. Sheen said he had known about the diagnosis for about four years and at first thought that he had a brain tumor. “It is a hard three letters to absorb,” he said. He said he did not know how he contracted the disease.

“I was doing a lot of drugs,” he said. “I was drinking way too much. I was making a lot of bad decisions.”

Mr. Sheen said that he did not think it was possible that he had transmitted the disease to others. He said that he had unprotected sex with two people, but that he was under the care of doctors at the time. He said that he has told every one of his sex partners about his diagnosis.

Over the years, Mr. Sheen, 50, has acknowledged extensive drug use and the hiring of prostitutes. His personal life became the focus of global media attention in 2011 after he had a drug-fueled public meltdown, and CBS was forced to shut down production of his hit sitcom, “Two and a Half Men.”

Mr. Sheen was fired from the series, but he quickly returned with the FX comedy “Anger Management.” That series has since been canceled. Hollywood databases indicate that Mr. Sheen has no current television or movie projects.

The gossip site set off speculation earlier this month when it published a lengthy post about an unnamed actor’s H.I.V.-positive diagnosis. Other celebrity websites followed with their own reports — without naming the actor — but The National Enquirer on Monday identified the star as Charlie Sheen. Other media companies, including People Magazine and Radar, then did the same.

Mr. Sheen said on “Today” that he now had a responsibility to better himself, and that he hoped that his decision to come forward would help other people. “Hopefully, with what we are doing today, others may come forward and say, ‘Thanks, Charlie, for kicking the door open.’”

Mr. Sheen’s doctor, Robert Huizenga, joined him during one segment of the interview. Dr. Huizenga is an associate professor of clinical medicine at the University of California, Los Angeles.

Dr. Huizenga said that he had known Mr. Sheen for five or six years, and that Mr. Sheen was immediately put on treatment when he contracted H.I.V. He said that the treatment had suppressed the virus and the Mr. Sheen was “absolutely healthy,” but that his biggest concern was depression and substance abuse.

Dr. Huizenga confirmed that Mr. Sheen had an “undetectable level of the virus” in his blood and did not have AIDS.

Mr. Sheen said that he was on the “triple cocktail” of H.I.V. medications and takes four pills a day. He said that he was not doing drugs but was still drinking a little bit.

Asked whether Mr. Sheen could be trusted to take medication in an impaired state, Dr. Huizenga said that it was a worry that if Mr. Sheen were overly depressed, he would forget to take his pills. “We’re petrified about Charlie,” he said.

Mr. Sheen said that since his diagnosis, he has never missed taking his medication.

When asked whether he would stop drinking, Mr. Sheen said that “perhaps the freedom of today may lead to that as well.”