The Afghan intelligence service, the National Directorate for Security, said at least 75 women and 159 children, most of them from foreign countries, are in custody.
There was no way to independently confirm that the prisoners the government presented to reporters are affiliated with the Islamic State group.
Most of the arrested IS members are from Pakistan, Jordan and Central Asian countries, said an NDS officer who asked that his name not be used as the rules of the agency don't allow him to be identified.
As many as 277 foreigners are among the arrested militants, he said.
Washington's peace envoy Zalmay Khalilzad tweeted earlier this month that IS in eastern Afghanistan has been weakened by operations carried out not just by the U.S. and Afghan forces, but by the Taliban as well.
U.S. Sen. Lindsey Graham said last week that President Donald Trump may announce an American troop drawdown from Afghanistan before the year's end, which would likely begin next year.
Graham, speaking from the Afghan capital of Kabul, said the president could reduce troop numbers to 8,600, down from the current estimated 12,000.