The troops were travelling in a military vehicle on a desert road linking Hadramawt to neighbouring Shabwa province when they were intercepted them fired on, the official said.
"Three soldiers died on the spot and three others were wounded," the source told AFP.
Al-Qaeda in the Arabian Peninsula (AQAP) has seized large parts of Hadramawt and imposed a strict version of sharia, Islamic law.
The insurgent group has been in complete control of Hadramawt's provincial capital Mukalla since April.
Meanwhile, in the western port city of Hodeida, Iran-backed rebels foiled an attempt by a group of Al-Qaeda suspects to blow up intelligence headquarters, a local security official said.
More From This Section
The rebels stopped another bomb-laden vehicle driven by a suicide attacker before it entered the building, the official said, adding that the explosives were defused and the bomber arrested.
Another security official said three vehicles were involved in the attack, which prompted "an hour-long clash that left casualties on both sides."
The official, speaking of "unknown gunmen", said they were attempting to free prisoners held at the building.
The Huthis, allied with forces loyal to ex-strongman Ali Abdullah Saleh, seized the Sanaa in September 2014 before taking over several other provinces and towns, including Hodeida.