Lt Gen Igor Kirillov, head of the Radiation, Chemical and Biological Protection Forces, was outside a residential block early on Tuesday when an explosive device hidden in a scooter was detonated remotely.
The Russian security service said the unnamed suspect was recruited by Ukrainian intelligence, according to state media agencies.
Ukraine's security service had already claimed it was behind the killing, a source told the BBC on Tuesday.
The Ukrainian source said Kirillov - who was Russia's chemical weapons chief - was "a legitimate target" and alleged he had carried out war crimes.
On Monday, the day before the killing, Ukraine charged Kirillov, 54, in absentia, saying he was "responsible for the mass use of banned chemical weapons". Russia denies the allegations.
The Russian Federal Security Service's (FSB) public relations centre said on Wednesday the detained 29-year-old was "suspected of committing a terrorist act".
A statement said that during "interrogation he explained that he was recruited by the Ukrainian special services".