The detention of Karim Massimov was announced by the National Security Committee, a body he headed until his removal this week.
Authorities now appear to be back in control of the largest city Almaty.
But President Kassym-Jomart Tokayev said “terrorist” attacks were still happening in some places.
He made the comments in a phone call with Russian counterpart Vladimir Putin, who sent hundreds of troops to Kazakhstan this week to help restore order.
President Tokayev has blamed foreign-trained “terrorists” for the unrest, without giving evidence.
The presence of Russian troops has brought criticism from US Secretary of State Anthony Blinken, who said “one lesson of recent history is that once Russians are in your house, it’s sometimes very difficult to get them to leave”.
Russia’s foreign ministry called Blinken’s remarks offensive and responded with sharp words: “When Americans are in your house, it can be difficult to stay alive and not be robbed or raped”.
The protests in Kazakhstan began in response to fuel hikes but grew to reflect discontent at the government and former President Nursultan Nazarbayev, who led the country for three decades and is still thought to retain significant influence.
The Interior Ministry says 26 “armed criminals” and 18 security officers were killed in the clashes. More than 4,000 people have been detained, according to the ministry.
The figures have not been independently verified. Phone lines and internet services were down during the protests making establishing a full picture of events difficult.
Kazakh authorities gave no other details about why Mr Massimov was arrested.
On top of his role as head of the intelligence agency, which grew out of the Soviet state security force the KGB, Mr Massimov was a close ally of President Nazarbayev, twice serving as his prime minister.
Also this week President Tokayev removed Mr Nazarbayev from his role as head of the influential Security Council, appointing himself in his place.
SOURCE: NEWS AGENCIES