The law violated the rights of gay people and subjected them to “cruel and inhuman punishment”, they said.
Several cases of “violence and retaliation” have been reported since President Yoweri Museveni signed the law last month, the activists added.
Uganda is a deeply conservative society where many people oppose gay rights.
However, some people are beginning to question whether punishments proposed in the law are too harsh, reports BBC Uganda correspondent Catherine Byaruhanga.
It allows life imprisonment as the penalty for acts of “aggravated homosexuality” and also criminalises the “promotion of homosexuality”.
The Civil Society Coalition on Human Rights and Constitutional Law, which represents about 50 groups, filed the petition in the Constitutional Court, asking for the law to be annulled.
Ruling party MP Fox Odoi, who is Mr Museveni’s former legal adviser, was among the lead petitioners.
He broke ranks with his party by opposing the law in parliament, and said he did not fear a backlash from voters in the 2016 election, our reporter says.
“I don’t fear losing an election. There is only one thing I fear – living in a society that has no room for minorities. I will not live in a society that doesn’t respect and protect people who are different from the majority,” Mr Odoi said.
Prominent Ugandan journalist Andrew Mwenda also supported the court action.
“This Act not only represents an effort by the executive and parliament to scapegoat an unpopular minority for political gain, but we believe it also violates the highest law of our country,” he said.
Some people known or suspected to be gay had faced “violence and retaliation” since the law was signed, the coalition said in a statement, the AFP news agency reports.
It had documented 10 cases of arrests of people, and at least three cases of landlords evicting tenants, the coalition added.
Uganda’s authorities have defended the law, saying President Museveni wanted “to demonstrate Uganda’s independence in the face of Western pressure and provocation”.
The World Bank has postponed a $90m (Â£54m) loan to Uganda to improve its health services after the law was approved.
Several European nations – including Denmark, Norway, the Netherlands and Sweden – have cut aid to Uganda to show their opposition to the law.
The sponsor of the law, MP David Bahati, insists that homosexuality is a “behaviour that can be learned and can be unlearned”.