The two leaders agreed to "inhibit all activities of armed groups and prevent the use of our respective territories for the destabilisation of one or the other of our states".
The non-aggression pact calls for the establishment of a monitoring group comprising foreign ministers from each country.
Al-Bashir and Deby sealed the agreement on the sidelines of a summit held by the Organisation of the Islamic Conference (OIC) in Dakar, the Senegalese capital.
They also committed to normalise relations between their countries.
The signing was witnessed by Ban Ki-moon, UN secretary-general, and Abdoulaye Wade, the president of Senegal, who brokered the agreement.
The Sudanese government denies backing armed groups or supplying weapons to Chadian rebels who launched a failed assault last month on N'djamena, the Chadian capital.
Despite Thursday's peace deal, Janjawid militias have levelled allegations against Khartoum, saying the government had used the armed men in putting down a local rebellion.
In an interview with a British television company, Mohammed Hamdan, a Janjawid commander admitted for the first time that the weapons they used and the orders they followed had all come from the Sudanese government.
Hamdan said he had met al-Bashir in his home for orders to carry out campaigns in Darfur and that the government had given them cars and weapons.
The Sudanese government has yet to respond to the claims.
The peace pact is seen as a small step towards ending violence in Darfur.
However, on the same day, the Chadian government accused Sudan of launching "several heavily armed columns" against the country.
It said Chadian rebels based in Sudan had crossed into the border town of Moudeina to launch an offensive.
Sudan, meanwhile, has repeatedly accused Chad of supporting Darfur rebels.
According to the UN, there are about 470,000 refugees in eastern Chad including 250,000 from Darfur and 57,000 from the Central African Republic, as well as 180,000 internally-displaced Chadians.