Uganda's President Yoweri Museveni has written a letter to his top security chiefs warning against the use of torture.
He described it as "unnecessary and wrong and must not be used again".
It followed media reports alleging that several people, suspected to be connected to the murder of a senior police officer, had been tortured, a BBC report had said.
Ugandan security officials have been accused by human rights groups of using torture to get confessions.
Mr Museveni said torture was wrong because it was sometimes employed on innocent people, which was unfair, and could lead them to admitting guilt to stop the pain.
He also said that good investigators could obtain convictions without using torture.
Assistant Inspector General of Police Andrew Felix Kaweesi, the third most senior police officer in the country, was shot dead outside his house in March.
Ugandan newspapers have shown suspects charged in the murder of Mr Kaweesi with visible signs of injuries when they appeared in court.
Last Sunday, Maria Burnett from Human Rights Watch (HRW) called for police to take suspects' allegations of torture seriously. She also said the officers allegedly involved should be investigated "for torture and mistreatment".
She added that HRW had spoken to hundreds of witnesses over the last 15 years who had complained of being tortured.
Uganda ratified the United Nations Convention against Torture in 1986, which meant that torture should be outlawed in the country.