Senegal's President, Abdoulaye Wade, made the announcement at an African Union summit in the Gambian capital, Banjul, agreeing with the AU that Africa should dispense its own justice.
Mr Habre fled to Senegal in 1990 and denies knowledge of the alleged murder and torture of political opponents.
He ruled Chad for eight years before being deposed in 1990 in an uprising led by current President Idriss Deby.
Earlier attempts to prosecute him in Senegal have been hampered by judicial rulings preventing him from being tried there.
In the absence of any prosecution, Belgium moved to try Mr Habre under its human rights laws, which allow nationals of any country to face charges within.
Eventually, Senegal referred the case to the AU to decide where to try Mr Habre.
The United Nations also pressured Senegal, issuing a 90-day deadline in May for Dakar to agree to a trial on its soil.
"Africans must be judged in Africa, that's why I refused to extradite Hissene Habre to Belgium," President Wade said, confirming his decision at the AU summit.
"We thought Senegal was the country best placed to try him and I think we must not flee from our responsibility."
He suggested that a special court would be set up in Senegal to handle the case with a wider African jurisdiction, and in co-operation with Chad's current authorities.
Those campaigning for Mr Habre's prosecution welcomed Senegal's decision.
"It's a great day for justice in Africa, because the continent's leaders have shown that no-one, not even an ex-president, can escape the law," said Reed Brody of Human Rights Watch.
