In a letter to lawmakers published Friday by The Daily Monitor newspaper, President Yoweri Museveni criticized parliament for passing the bill without having the required two-thirds majority.
Museveni said his party will propose a "scientifically correct" alternative to the tough bill.
"The question at the core of the debate of homosexuality is: What do we do with an abnormal person? Do we kill him/her? Do we imprison him/her? Or we do contain him/her?" he wrote in the letter dated December 28.
The president said the fight against homosexuality needed to focus on the economy and on industrialization to avoid exposing unemployed young people to "these disgusting behaviours."
However, Museveni said he would support a life sentence for people encouraging others to become homosexuals.
Uganda has been under international pressure from Western donors and human rights groups over gay rights since 2009, when a legislator proposed that homosexuals could even be sentenced to death.
The government, bowing to threats to cut development aid, removed the death penalty from the new bill.
On Monday, Nigeria's President Goodluck Jonathan signed into law a bill that stipulates 14-year prison terms for those who enter into same-sex unions and 10-year terms for those involved in gay clubs or organisations.
The United Nations slammed the legislation, saying it jeopardizes the fight against the country's AIDS epidemic and violates human rights.