General Abdullah al-Kulaibi, head of the 63rd brigade of the elite Republican Guard unit, was killed in the attack by tribesman opposed to Saleh's rule in the strategic town of Nihm, the defence ministry said in a statement on Monday.
Four of the attackers were killed during the attack on the military base, about 60 kilometres (42 miles) from the Yemeni capital, it said.
Yemen state television confirmed the assault on the military base but made no mention of hostages. It also claimed the attackers were gunmen from the Yemeni Islamist Islah (Reform) party.
A tribal source, speaking to AFP on condition of anonymity, said that gunmen from tribes who are opposed to Saleh took brief control of parts of the base, kidnapped 30 Yemeni soldiers, and then escaped into nearby hills. He added that two of the four tribesmen killed overnight died during what he described as the "constant shelling" of Nihm by the military in retaliation for the assault.
Nihm is one of several villages that collectively make up the strategic northern gateway into Sanaa and is site of at least five Republican Guard bases.
The elite unit has so far prevented dissident General Ali Mohsen al-Ahmar, who now controls part of the capital, from calling in reinforcements from Yemen's northern provinces where he has a strong following.
The tribesmen who carried out the assault on the military base late Sunday are allied with General Ahmar and have been battling government troops for control of the area.