General Umpa Mendy and General Ansumana Tamba sought refuge in Equatorial Guinea alongside Jammeh in January 2017 after his brutal 22-year rule came to an end.
They were arrested at the beginning of the year, shortly after they returned to Gambia.
At a court in Banjul, the pair pleaded not guilty to desertion. The charge can carry life imprisonment.
Mendy was in personal charge of protecting the former leader, while Tamba was the head of his presidential guard.
The former president’s refusal to step down after losing an election the month before to unknown businessman Adama Barrow pushed neighbouring countries to the brink of a military intervention until Jammeh conceded at the 11th hour.
The top brass left the country on board Jammeh’s plane bound for Equatorial Guinea.
The generals’ arrival caused controversy as airport staff waved them through without attempting to detain them for questioning.
Elements of The Gambia’s armed forces are known to have maintained support for the former president and a number of soldiers are on trial on treason and mutiny charges for plotting to overthrow the country’s newly elected government.
The country is still being secured by soldiers deployed by the ECOWAS regional grouping until reform of the security services is complete.
The court case is expected to continue later this month.