Earlier reports said that the explosion was triggered by a bomb attached to a police vehicle, but later officials said that it was caused by a suicide bomber, who detonated while riding an explosives-laden motorcycle.
A spokesperson of Ghani's campaign said that the campaign rally -- held in the run up to the September 28 election -- went ahead as planned.
The Taliban claimed responsibility for the attack, claiming they were targeting security forces at the campaign rally, according to TOLO News.
Another explosion on Tuesday close to an Afghan Defence Ministry building and the US embassy in Kabul was also claimed by the Taliban. Three people were killed in this attack, the BBC reported.
In August, the Taliban threatened to boycott disrupt the entire election people with violence, calling it an exercises manipulated by "foreign powers".
Ghani is seeking re-election in the upcoming polls and faces 17 other candidates for the presidency, including the current Chief Executive Abdullah Abdullah.
During 2018, the Taliban and US representatives held nine rounds of negotiations in Doha in search of a peace treaty after 18 years of conflict, but the talks were suspended by US President Donald Trump earlier in September after an attack in Kabul killed an American soldier.