The final list of 18 candidates for the 9 October polls also includes northern Uzbek regional commander General Abd Al- Rashid Dostum, one woman and a poet.
But the main contest is expected to be between Karzai and Qanuni, who is part of the powerful Tajik bloc of former anti-Taliban commanders from the Northern Alliance.
Although Qanuni is expected to pose a serious challenge to Karzai, the inclusion of other commanders such as Dostum has the potential to divide any anti-Karzai movement.
The Afghan-UN's Joint Election Management Body cut five candidates deemed unqualified or unsuitable from the list, but nevertheless allowed some of the most controversial figures to run.
The election commission forwarded objections against three candidates - accused of murder, looting and running private militias - but it decided not to axe these candidates.
US-backed Karzai was elected transitional leader in June 2002 by tribal leaders for a two-year term. His mandate expired in June.
For all his educated ways, the 46-year-old is seen by many fellow Afghans, notably among the majority Pashtun ethnic group to which he belongs, as weak and dependent on US support.
But he remains favourite to win Afghanistan's first democratic election, even after snubbing his militarily powerful defence minister, Muhammad Qasim Fahim, as a running mate.
The UN estimates up to 90% of
Afghans have registered to vote
Fahim has thrown his support behind Qanuni, who also has the backing of Foreign Minister Abd Allah Abd Allah. All three are Tajiks, the country's second largest ethnic group.
Qanuni is one of the three candidates who had objections raised against his name.
Karzai's chosen running mate Abd Al-Karim Khalili was also allowed to stay on the president's ticket despite being accused of past crimes.
US envoy to Afghanistan Zalmay Khalilzad says he has assurances from Fahim that he will honour the political process, but there are still fears that rivalries could turn violent in the heat of elections, especially if the vote is close-run.
Among the most controversial candidates in the election is Uzbek general Abd Al-Rashid Dostum, who fought with and against the Soviets in the 1980s, and with the Taliban until he joined the Northern Alliance that with US assistance drove the Taliban from Kabul in late 2001.
Also allowed to run despite objections was Muhammad Mohaqiq, of the minority Shia Muslim Hazaras of central Afghanistan.
Dostum was a major Northern
The lone woman candidate, Masuda Jalal, a medical doctor who ran a distant second to Karzai at the Loya Jirga two years ago, was approved as a candidate.
Taliban loyalists are fighting a guerrilla war against US-led occupation forces and the Afghan National Army, mainly in the south.
They have vowed to disrupt elections they call a sham, and close to a thousand people have been killed in the past one year in mounting violence before the polls.
About 20,000 US-led troops are hunting the Taliban and its allies in the south and east, while a NATO peacekeeping force will be reinforced to total about 8500 by the time the elections begin.