Ansar al-Sharia demanded the authorities release Islamist fighters from jail in exchange for the soldiers' safe return.
The announcement came only days after a series of suicide attacks and armed assaults by the group in southern Yemen left more than 100 people dead, most of them soldiers.
It had previously warned that it was going to launch a series of attacks on the authorities, dubbed the "Flooding River".
Ansar al-Sharia, whose name means "Partisans of Islamic law" in Arabic, was formed by AQAP in response to the growing youth movement in Yemen, which has marginalised Salafi-jihadists who advocate the violent overthrow of the government and the establishment of an Islamic state.
Mass, peaceful pro-democracy demonstrations have swept the Arab world in the past year, not least in Yemen, where they eventually forced President Ali Abdullah Saleh to hand over power to his deputy in November.
Last April, jihadist websites published an interview with AQAP's religious leader, Adel al-Abbab - also known as Abu al-Zubair - who said that Ansar al-Sharia had been set up to attract people to Sharia rule in the areas under the control of AQAP and allied groups, including "Islamic" punishments.
In the past year, militants linked to AQAP have seized parts of the southern province of Abyan, including the provincial capital, Zinjibar.
Ansar al-Sharia says it provides public services to locals in such areas and claims to solve their day-to-day problems.
It says it is reproducing the model of Sharia rule espoused by the Taliban in Afghanistan and the Islamic State of Iraq, a militant umbrella group that includes al-Qaeda in Iraq.
Adel al-Abbab said Ansar al-Sharia had successfully attracted locals and tribesmen in some areas by turning their strategy "into popular action, instead of keeping it as an elite one".
Many of those involved in Ansar al-Sharia are jihadists who have experienced living in an "Islamic state", either in Afghanistan in the mid-1990s, or among jihadists in Iraq after the US-led invasion in 2003.
Ansar al-Sharia's ability to launch attacks, as well as build local support, indicates that the Yemeni authorities' struggle with Islamist militants may soon become bloodier and more protracted.
An offshoot of al-Qaeda in the Arabian Peninsula (AQAP) has issued a statement threatening the lives of 73 Yemeni soldiers it says it captured last week.