"The use of torture is unnecessary and wrong and must not be used again if it was being used as I see some groups claiming in the media," Museveni wrote.
"The use of torture is unnecessary and wrong and must not be used again if it was being used as I see some groups claiming in the media," Museveni wrote in a letter to police and intelligence chiefs.
He expressed concern that security operatives "may torture the wrong person, somebody who is totally innocent," adding: "This is very unfair."
"Somebody may admit guilt when he is innocent in order to be spared being tortured," said the longserving leader.
Human Rights Watch (HRW) has repeatedly cited use of torture of detainees in Uganda.
In a 2009 report entitled "Open Secret", HRW said torture and illegal detention were common in Uganda.
In response to Museveni's letter, HRW Africa director Maria Burnett tweeted regret that the president "didn't actually call for investigation, accountability for torture...and he should have."
Museveni's letter came after a number of accusations, including by a town mayor, of torture at Nalufenya prison outside the capital Kampala.
Photographs of Geoffrey Byamukama, mayor of the southwestern town of Kamwenge, in hospital with extensive injuries to his legs and back horrified many Ugandans when they emerged on social media last week.
Byamukama said the injuries were inflicted during questioning by police about the March assassination of Felix Kaweesi, a police spokesman.
Thirteen men also accused of involvement in the murder also showed evidence of injuries when they appeared in court on May 5.
One accused, Ahmad Senfuka Shaban, told relatives he had been beaten with cables, had boiling water and acid poured on his body and electricity shocks administered on his genitals.
Police spokesman Asan Kasingye said media claims the men had been tortured were "not true” and that the Uganda Human Rights Commission -- a government body - was satisfied with torture safeguards.