They were abducted by a splinter group a day after the first AU peacekeepers were killed in an ambush blamed on another guerrilla force in the western Sudanese region, where non-Arab rebels took up arms against the central government in 2003.
"Most have been released but it is not clear how many," said AU spokesman Noureddine Mezni.
The freed hostages, who had been held near the border with Chad, were on their way back on foot to the area's main town.
Mr Mezni, who did not give details on the talks with the kidnappers, said earlier reports had indicated 16 of the 18 were being freed but that was not confirmed.
The abductions come a day after two Nigerian AU soldiers and two civilian contractors were killed in an ambush by a different rebel group, the Sudan Liberation Army. A third Nigerian soldier died from his injuries yesterday, and another two soldiers are missing.
Both events raise fears for the safety of the 6,000 AU troops and observers who have been deployed to help monitor an unstable ceasefire in Darfur over the past year. The troops have had financial and logistical support from the EU and the US, but have often complained that the Sudanese government has blocked the arrival of supplies.
Adam Thiam, an AU spokesman said: "We are worried by the two incidents the killing of two soldiers and the taking of hostages. We are worried this is targeting the AU as a fighting force, although the AU is there as a peace force."
All sides in the Darfur conflict have agreed to abide by a ceasefire while peace talks are held in Nigeria, Abuja, but aid agencies and the AU have complained that the violence has escalated.
- More about: