The spy service on Monday said 20,000 kilograms of ammonium nitrate, used in explosives, had been seized in southeastern Paktika province.
The National Directorate of Security (NDS) in a statement said the banned fertiliser was recovered from hidden apartments of a vehicle on its way to the provincial capital, Sharan.
It said the seizure prevented possible bomb attacks during the landmark presidential and provincial council elections due on April 5.
The spy service said anti-state elements wanted to transfer the chemical to Sharan and subsequently use it in suicide attacks and bomb blasts during the elections.
Three persons identified as Abdul Rahman, Khalilur Rahman and Zahidullah have been detained in connection with smuggling the fertiliser, the statement concluded.