Musa Mahmudi — a youth social worker — told Britain's Guardian newspaper earlier this month that teachers and local officials were involved in the ring based in Logar province, sparking outrage across the country.
Mahmudi and activist Ehsanullah Hamidi were later detained by the National Directorate of Security (NDS) on their way to meet with the European Union ambassador in Kabul last week.
Two US troops killed in helicopter crash in Afghanistan
"They are in Kabul now and reunited with members of their families. There is no restriction to their movement," Naeem Nazari, deputy head of Afghanistan's Independent Human Rights Commission (AIHRC) said.
At least 546 boys from six schools were allegedly abused, the Guardian reported.
Some victims went on to be murdered, the newspaper said, adding that rights campaigners had uncovered more than 100 videos of the abuse.
Authorities have not confirmed the allegations.
The two were released on Wednesday just a day after the NDS released a video of Mahmudi appearing to retract his account, which sparked harsh condemnation of the spy agency's conduct by President Ashraf Ghani and the US envoy in Kabul -- who blasted the agency over its "Soviet-style tactics".
Eight children among 15 civilians killed by mine in Afghanistan: govt
Amnesty International had also called for the pair's immediate release and warned that Mahmudi had been receiving death threats accusing him of "dishonouring the people of Logar".
Hamidi's role in revealing the scandal was not immediately clear, and he was not referenced in the Guardian story.
Sexual abuse is widespread in Afghanistan despite efforts to clamp down on the crime, and boys are often reluctant to come forward in a culture that still shames victims rather than going after perpetrators.
Parts of Afghanistan still tolerate the practice of bacha bazi, or "boy play", where older men force boys to dress up as women and then force them to have sex.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ