According to the NDS, the militants were arrested in separate operations.
They were working to recruit youth and plan terror attacks, the NDS said in a statement.
The statement identified the militants as Javed, Azizullah, Bilal, Sediqullah, Qudratullah, Ikramullah, Muhibullah and Ali Ahmad.
According to the statement, the individuals confessed that they had joined Daesh quite a "long time ago" and would collect money under the guise of building mosques and madrassas.
The group was also involved in transferring Daesh militants to Nangarhar province, planting mines, carrying out assassinations and carrying explosives, the statement added.