They were arrested days after police found the four-year-old’s body on 1 May in a plastic bag close to her aunt’s home.
Iyapha had gone missing April 30 while playing outside her aunt’s house in Town Two Khayelitsha. Her body was discovered at the next morning.
According to her family, one of the accused is the father of Iyaha’s friend she had been playing with at the time of her disappearance.
The accused, Thabiso Mtshanguta and Thabo Titus, whose shacks were demolished by angry residents, appeared in the Khayelitsha Magistrates’ Court on Friday morning.
The State said after investigation which included DNA, no evidence linked the two to the crime.
National prosecuting authority Eric Ntabazalila said: “There is a male DNA that was found in the underwear and lower parts of the deceased’s body but that DNA does not belong to the two accused who appeared in court.
“Investigation on that DNA is continuing and we hope it will point us in a direction where a suspect will be arrested and prosecuted. For now nothing links these two accused to the crime.”