The United Nations Development Programme and UNAIDS has formed a commission to review the effect of laws around the world that discriminate against victims of HIV.
"Laws that inappropriately criminalise HIV transmission or exposure can discourage people from getting tested for HIV or revealing their HIV positive status," said the two agencies in a statement.
They can "punish rather than protect people in need," added the agencies.
The new commission is therefore aimed at addressing "one of the main handicaps" of the fight against the illness, said the head of the Joint UN Programme on HIV/AIDS Michel Sidibe.
"In many places, what I experienced is very simple -- instead of universal access to help to deal with social injustice... people are facing ... universal legal obstacles," said the UNAIDS executive director
Some 49 countries in the world have laws that criminalise transmission or exposure to HIV, said Sidibe.
In addition, 86 countries have homophobic legislation, including seven which can impose up to the death penalty for homosexuality.
Sidibe did not name the countries, but said they were mostly countries in the Middle East.
Around 52 countries also apply restrictions on the movements of people with AIDS.
Sidibe noted that almost 70 percent of new HIV infections in Eastern Europe and central Asia affect drug users, of whom the majority have no access to medication because it is not authorised.
It is time to "restore the dignity of people and to remove the bad rules," said Sidibe.
The commission will send experts to different countries to gather and share evidence about the impact of laws on people living with HIV.
It will then produce a set of recommendations in 18 months.
Almost 60 million people have been infected by HIV and 25 million people killed by causes related to the virus since the epidemic started, according to data published by UNAIDS in November 2009.