Bowe Bergdahl has pleaded guilty to desertion charges.

The Army sergeant appeared in military court Monday morning at Fort Bragg to face charges for fleeing his Afghanistan post in 2009.

The Taliban captured Bergdahl after he went AWOL and held him captive for five years, before President Obama secured his release in exchange for five Taliban prisoners at Guantanamo Bay in 2014.

Earlier in the morning, ABC News aired an interview with Bergdahl - his first televised interview since returning to the U.S.

In the interview, which was filmed last year by British filmmaker Sean Langan, Bergdahl said it was 'insulting' that he's been portrayed as a traitor.

The 31-year-old Idaho native offered no explanation for why he abandoned his Afghanistan outpost in 2009. But he says the narrative that he deserted his company to join the Taliban is false.

'You know, it’s just insulting frankly,' Bergdahl said. 'It’s very insulting, the idea that they would think I did that.'

Scroll down for video

Bowe Bergdahl is seen above in his first video interview since being released by the Taliban in 2014

Last year, Bergdahl sat down for an interview with British filmmaker Sean Langan. Part of the interview was aired by ABC News on Monday

While he didn't speak about his reasons with Langan, he has tried to explain his actions before.

In taped conversations with filmmaker Mark Boal, which aired on the second season of the podcast Serial, Bergdahl claimed he left his post so that he could report his 'unfit' platoon commander to senior officers.

In the more recent interview, Bergdahl said he doubted he could get a fair trial due to the negative comments made by now-President Trump on the campaign trail last year.

'We may as well go back to kangaroo courts and lynch mobs that got what they wanted,' Bergdahl said. 'The people who want to hang me, you’re never going to convince those people.'

Bergdahl, right, arrives for a motions hearing on Monday on Fort Bragg

Bergdahl, left, pleaded guilty to charges of desertion today. He is seen above arriving at the Ft. Bragg military courthouse for a motions hearing Monday

Bergdahl abandoned his post in Afghanistan in 2009. His motives for doing so remain unclear

Trump has been outspoken in his belief that it was a bad idea to release five Taliban prisoners in exchange for Bergdahl in 2014, who he thinks should have been executed.

Far from living it up as a Taliban recruit, Bergdahl went into detail about his five years in captivity, many of which were spent in a cage.

'It was getting so bad that I was literally looking at myself, you know, looking at joints, looking my ribs and just going, "I’m gonna die here from sickness, or I can die escaping,"' Bergdahl said. 'You know, it didn’t really matter.'

President Obama's administration secured Bergdahl's release in 2014, in exchange for five Taliban inmates at Guantanamo Bay

Bergdahl is seen above being released in 2014, after five years of imprisonment

A U.S. official says that Bergdahl twice tried to escape, and was severely punished both times when he was recaptured.

'When they recaptured him and brought him back, the next day they spread-eagled and secured him to a metal bed frame,' Terrence Russell, a military official who debriefs former U.S. captives, told Langan in another video.

'They took a plastic pipe … and they started beating his feet and his legs repeatedly with this plastic pipe. … The idea was to just beat him and injure his legs and his feet so that he could not walk away again.'

While there have been rumors that Bergdahl went AWOL trying to join the Taliban, he has never been charged with a crime related to aiding the enemy.

His military hearing began Monday at Fort Bragg. Bergdahl pleaded guilty to desertion charges. It will now be up to a judge to decide on Bergdahl's sentence, which could include prison time.