Seven other government troops were wounded in the battle, which lasted more than an hour, CNN reported.
The compound's main building was heavily damaged, officials said, when the militants attacked the base from three sides. Attackers drove a vehicle loaded with explosives into the base and detonated it.
An al-Qaida brochure distributed before the attack had warned soldiers not to defend the Yemeni government, which the militants considered an ally of the United States.
Abyan province was a center of militant activity until government forces drove many insurgents out of the region.
Kate Middleton recycles dress at movie premiere
Gal Gadot cast as Wonder Woman for 'Batman vs. Superman'