Manuel Fontaine, UNICEF’S regional director for Western and Central Africa, told Reuters that the children were held in barracks in Maiduguri, Borno state capital.
Though the period they spent in detention was not stated, the rights groups said there was no proper legal process for their arrest.
UNICEF said they were not formally charged and some ended up in “so-called” rehabilitation centres or internally displaced persons (IDPs) camps.
“We fear that there are still kids who are being at least temporarily detained because they are being released from Boko Haram areas by the army but then kept for a while,” Fontaine said.
He gave no details of the ages of the children or how long they spent in the barracks.
Fontaine also said the conflict, which had killed thousands and displaced more than two million, had separated around 20,000 children from their parents, of which 5,000 had since been reunited with families.
“Once we get children out, there is a major issue of stigmatisation in the communities,” he said.
“There is a sense that children who have been associated with Boko Haram for a while, could be, and in some cases we have some evidence, are rejected by community and people around them.
“This was also a problem for the girls freed from the town of Chibok.”
The army is yet to officially react to the issue.