"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.
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.
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.
Disclaimer: No Business Standard Journalist was involved in creation of this content
