The attack is the latest in a series of bombs and shootings targeting military personnel in Yemen, which is struggling to achieve a political transition that aims to turn the republic into a federation.
The attack on the bus comes a day after rockets and explosions shook the capital, including one near the French embassy.
A military official said the explosion targeted a bus transporting soldiers and officers in the capital's southern neighborhood of Dar Salam.
Fourteen soldiers were wounded, two of whom later succumbed to their injuries, the official said, adding that the bus had been carrying 18 passengers.
Witnesses said that two gunmen in a car opened fire at the bus moments before the blast.
Attacks on military personnel are usually blamed on Al-Qaeda, whose Yemen branch is one of the most active affiliates of the global jihadist network.
BA/BA