The "Computer Misuse Amendment Act" was introduced by a ruling party legislator then passed by parliament last month amid criticism by rights activists and opposition politicians.
The law proscribes sending or sharing of information that promotes hate speech, is false or malicious and was unsolicited. It also bans sending information through a computer that could "ridicule, degrade or demean another person."
Penalties for violations under the law range from custodial sentences of up to ten years or steep cash fines.
Museveni, 78, in power since 1986, has previously repeatedly voiced anger at Ugandans who share what he said are lies about his government on social media.
Those opposed to the law say it is likely aimed at victimising government critics and opponents who produce or share information on social media that may harm ruling party officials' political prospects.
The law "poses a great danger to the right to access information electronically and to the freedom of speech and expression over computer networks," said Allan Bariyo, a Kampala-based cyber law expert.
Unwanted Witness, a digital rights pressure group, has also described the legislation as vague and overly broad, saying it will have the "effect of unjustifiably restricting legitimate freedom of speech and expression."
Indiscriminately banning sending and sharing of unsolicited information, they also say, will potentially reduce internet usage and cripple e-commerce.
Reuters, the news and media division of Thomson Reuters, is the world's largest multimedia news provider, reaching billions of people worldwide every day.Go to: https://www.reuters.com/