Two other soldiers were wounded in the explosion.
It appeared to have been carried out by a suicide bomber, an unnamed army officer told the AFP news agency.
There has been a severe deterioration in security in Libya since the 2011 uprising which ousted long-time leader Muammar Gaddafi.
The government has been struggling to control and disarm the numerous armed groups and militias who took part in the civil war which ended his 42-year rule.
Benghazi, the cradle of the revolution, has been a focal point for attacks on public institutions and officials.
It is the largest city in eastern Libya, where some groups and Islamist militias want more autonomy and a greater share of the region's oil wealth.
No group has claimed responsibility for the early morning attack at the Special Forces barracks.