Lt. Col. Mohammed al-Qudami, who was the intelligence chief for one of the sectors of Sanaa, was killed in the blast, the official said on condition of anonymity because he was not authorized to brief the media.
There was no immediate claim of responsibility, but Yemeni security officials are frequent targets for assassination.
Last month, a suicide bomber killed Maj. Gen. Salem Ali al-Quton, a Yemeni army commander who was leading the fight against al-Qaida in the country's south, while he was traveling in a three-car convoy in the southern city of Aden.
In the south, a group of children accidentally detonated an artillery shell they were playing with, killing one and wounding seven others, officials said.
The officials say the explosion took place Sunday in the town of Jaar, which was the scene of heavy fighting recently between al-Qaida militants and the army, and the boy died early Monday.
Landmines laid by al-Qaida fighters and unexploded shells in battlefields have so far killed more than 85 soldiers and civilians around Zinjibar, the capital of Abyan province, and nearby Jaar since the army recaptured the towns from militants last month.