To counter this, researchers tried prescribing a cocktail of drugs at the start of HIV therapy to treat "opportunistic" infections.
The results, published in the New England Journal of Medicine, showed deaths fell by 27%.
HIV itself does not kill. Instead, it leaves the body exposed to dangerous bacterial infections such as tuberculosis or pneumonia as well as fungi that can cause cryptococcal meningitis.
But starting antiretroviral therapy poses risks too. The drugs restore the immune system, but if it suddenly realises there is an infection, then it can launch such a strong attack - in the brain, for example - that this can occasionally be deadly too.
So, the trial gave patients with a CD count - used to measure the health of the immune system - below 100 a mix of drugs, including antibiotics, alongside standard antiretroviral medication for HIV.
Patients with a CD count below 50 are six times more likely to die within 24 weeks than those with a count above 100.
The trial was conducted in Uganda, Zimbabwe, Malawi, and Kenya and involved 1,805 patients over the age of five.
Normally, more than one in 10 would have died within weeks of diagnosis.
But the results showed the preventative therapy led to:
deaths falling by 27%
tuberculosis falling by 28%
cryptococcal disease falling by 62%
candidiasis falling by 58%
hospitalisation falling by 17%
Overall, three lives were saved for every 100 treated.
One of the study authors, Prof Diana Gibb, from the UK's MRC Clinical Trials Unit, told the BBC News website: "You might save over 10,000 deaths [globally], but also prevent tuberculosis disease, cryptococcal meningitis and hospital admissions, which are costly.
"So, I think it could have quite a big impact and could be a relatively simple additional intervention."
The medicine is $5 (£3.80) more expensive per patient than standard treatment.
'Back to the future'
And because every patient is prescribed all the drugs, no expensive tests for each infection are needed.
Speaking to the BBC at the IAS Conference on HIV Science in Paris, Prof Gibb said the approach was "very cost-effective throughout Africa" and "we think this should become part of guidelines".
Dr Carl Dieffenbach, the director of the division of Aids within the US National Institutes of Health, said the idea reminded him of the early era of HIV/Aids, when there was more emphasis on treating opportunistic infections.
He told the BBC News website: "It's logical, and it's 'back to the future' in a good way.
"I think it's the best possible medicine you could be doing, the challenge for health departments around the world is they've largely felt they could get out of dealing with the opportunistic infections.
"They can't neglect this population of patients, it's not enough to just put them on antiretroviral therapy."
Many patients on the trial had appeared healthy when they were diagnosed with HIV.
Despite their average CD4 count being just 36, half of them had showed no symptoms.
Drs Nathan Ford and Meg Doherty, from the World Health Organization, said: "[There needs to be a] renewed focus to respond to the needs of patients with advanced HIV infection who are at high risk for illness and death."