The National Directorate of Security (NDS) said the attack had been planned by the Pakistan-based Haqqani network and the Taliban leadership, though it offered no concrete evidence of the plot.
Shafiqullah Tahiri, spokesman for the spy agency, said the explosives had been found on Tuesday, hidden in cement bags in a truck on the eastern outskirts of the capital.
"Based on an investigation by the NDS, these explosives would have destroyed everything within 1,500 metres," Mr Tahiri told reporters.
"It would have been a catastrophe for people living in the city if it had been detonated.
"NDS forces discovered it due to prior information that the terrorists were organising this attack in a crowded part of Kabul."
During the NDS night raid early on Tuesday, five suspected plotters were killed in an exchange of fire, Mr Tahiri added. Two other people were arrested.
Kabul has been hit by a series of bomb and suicide attacks in recent years as Taliban insurgents battle against the US-backed government of President Hamid Karzai.
The most recent deadly attack was last Saturday when a suicide bomber blew himself up outside the defence ministry, killing nine people while US Defense Secretary Chuck Hagel was visiting a US base nearby in the city.
The NDS has been attacked twice in Kabul in the last four months. In December, a suicide bomber seriously wounded NDS chief Asadullah Khalid and in January another attack targeted the agency's headquarters.