SAN ANTONIO—The Army major general who led the military’s investigation into Sgt. Bowe Bergdahl testified Friday that he didn’t believe the soldier should be jailed for allegedly deserting his post in Afghanistan.

Maj. Gen. Kenneth Dahl, who was called by Sgt. Bergdahl’s defense, offered his testimony during the second and final day of a military hearing at an Army base here that will determine whether Sgt. Bergdahl should face a court-martial for desertion and other misconduct.

Maj....