Local media reported that the blast happened next to a passing military vehicle, in an area close to parliament and Turkey's military headquarters, the BBC reported.
Photos on social media showed large plumes of smoke rising from the area.
Ankara'da askeri servis konvoyunda meydana gelen patlamada ilk belirlemelere göre 5 kişi hayatını kaybetti pic.twitter.com/TeI1P05BMd— euronews Türkçe (@euronews_tr) February 17, 2016
A spokesman for the ruling AK party said the explosion was an "act of terrorism".
Ankara's governor, Mehmet Kiliclar, reportedly said the explosion was caused by a car bomb, but the Prime Minister, Ahmet Davutoglu, said the cause was still under investigation.
Turkey has been hit by a serious of attacks recently, including a suicide bomber that killed 10 people in Istanbul last month. Officials said the attacker had links with the so-called Islamic State (IS).
Last October, an attack at a peace march left at least 99 people dead in Ankara.
There have been increasing concerns that the country could be targeted by another big attack, the BBC's Selin Girit in Istanbul said.
Turkey has faced security threats from different groups, including IS and the outlawed Kurdistan Workers' Party (PKK).