MrMattis also emphasised the importance of standing up for US allies writing:
"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."
The announcement came a day after President Trump announced the withdrawal of all 2,000 US troops from Syria. It's a move that has been sharply criticised for abandoning America's Kurdish allies, who may face a Turkish assault once they leave.
There's also speculation that General Mattis's decision to quit was prompted by Pentagon plans for a significant drawdown of 7,000 troops serving in Afghanistan, as reported by US broadcaster CNN and the Wall Street Journal.
Unnamed officials suggest the troops could be out by the summer but there's been no official confirmation of the plans.
But officials now worry that any move to withdraw US troops could dampen those prospects and simply encourage the Taliban to wait it out until they can take advantage of the gaps when the forces leave.