Retired General Stanley McChrystal on Sunday slammed President Donald Trump as immoral, shady, and a liar, adding he wouldn't join the president's administration.

McChrystal, who was the U.S. commander in Afghanistan for a year during the Obama administration, didn't hold back in his criticism of the president in an interview with ABC News.

'I think it's important for me to work for people who I think are basically honest, who tell the truth as best they know it,' he said of why he would not join Trump's administration.

Retired General Stanley McChrystal slammed President Donald Trump as immoral, shady, and a liar

McChrystal said he would not serve in President Donald Trump's administration

'You think he's a liar?,' asked ABC's Martha Raddatz.

'I don't think he tells the truth,' McChrystal replied.

'Is Trump immoral, in your view?,' she asked.

'I think he is,' he responded.

McChrystal was the U.S. commander in Afghanistan under then-President Barack Obama and did not mince words then either.

He gave an interview to Rolling Stone in June 2010 where he mocked several administration officials, including then-Vice President Joe Biden.

Obama called him onto the carpet, dragging him from Afghanistan to the Oval Office for an explanation of the interview.

McChrystal apologized and resigned from his post amid the fallout.

On Sunday, he praised another military commander for his resignation.

McChrystal told ABC News that the resignation letter from Defense Secretary James Mattis was 'valuable' and should cause all Americans to think about their commander-in-chief.

'I would guess that Secretary Mattis took a long time agonizing over writing a letter that was as direct about his feelings as that particular letter was. He knew it would be very public and it would make a very strong statement that was much broader than the Syria issue. It was about America's role in the world,' he said.

He added: 'I personally think it was valuable. I think maybe it causes the American people to take pause and say, wait a minute, if we have someone who is as selfless and as committed as Jim Mattis resigns his position, walking away from all the responsibility he feels for every service member in our forces, and he does so in a public way like that, we ought to stop and say, OK, why did he do it? We ought to ask what kind of commander in chief he had that Jim Mattis that, you know, the good Marine, felt he had to walk away.'

Mattis' resignation came in protest after Trump announced he was pulling out U.S. troops from Syria, which the two men disagreed about.

Stanley McChrystal was U.S. Commander in Afghanistan under then-President Barack Obama until his resignation in June 2010 after he criticized Obama officials to Rolling Stone magazine

McChrystal praised Defense Secretary Jim Mattis' (right) resignation letter from Trump's Cabinet

He slammed Trump in his resignation letter - a move that earned him an early exit from the administration.

'Because you have the right to a Secretary of Defense whose views are better aligned with yours on these and other subjects,' Mattis wrote in his letter, 'I believe it is right for me to step down from my position.'

'One core belief I have always held is that our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnerships,' he wrote.

'While the US remains the indispensable nation in the free world, we cannot protect our interests or serve that role effectively without maintaining strong alliances and showing respect to those allies.'

Mattis also declared that America 'must be resolute and unambiguous in our approach to those countries whose strategic interests are increasingly in tension with ours.'

'We ought to ask what kind of commander in chief he had that Jim Mattis that, you know, the good Marine, felt he had to walk away,' McChrystal told ABC News

Trump later announced Mattis would leave the Pentagon at the end of the year instead of February as his resignation originally said.

Deputy Defense Secretary Patrick Shanahan will be acting secretary.

McChrystal cautioned anyone who would join the president's administration to think carefully if they could be fully loyal to Trump.

'I would ask them to look in the mirror and ask them if they can get comfortable enough with President Trump's approach to governance, how he conducts himself, with his values and with his world view, to be truly loyal to him as a commander in chief and going forward,' he said.

'And we're all instinctively loyal. But the reality is, if there's too much of a disconnect, then I would tell him, I think it's - it would be a bad foundation upon which to try to build a successful partnership with that job,' he added.

He said of Trump supporters: ' I would ask every American to do is, again, stand in front of that mirror and say, what are we about? Am I really willing to throw away or ignore some of the things that people do that are pretty unacceptable, normally, just because they accomplish certain other things that we might like?'

He added: 'If we want to be governed by someone we wouldn't do a business deal with because their background is so shady, if we're willing to do that, then that's in conflict with who I think we are. And so I think it's necessary at those times to take a stand.'