"Donald Trump is the first president in my lifetime who does not try to unite the American people -- does not even pretend to try," Mattis wrote in an essay in The Atlantic. "Instead he tries to divide us."
"We are witnessing the consequences of three years of this deliberate effort," wrote Mattis. "We can unite without him, drawing on the strengths inherent in our civil society. This will not be easy, as the past few days have shown, but we owe it to our fellow citizens; to past generations that bled to defend our promise; and to our children."
Mattis told ABC News Chief Global Affairs Anchor Martha Raddatz, "Enough is enough," shortly after the publication of his essay on Wednesday evening.
Since resigning as defense secretary in December 2018 over Trump's plans to pull U.S. military troops out of Syria, Mattis has never directly criticized the president.
In the essay entitled "In Union There is Strength" Mattis wrote that he has watched this week's events and is "angry and appalled."
"We must not be distracted by a small number of lawbreakers," he wrote. "The protests are defined by tens of thousands of people of conscience who are insisting that we live up to our values -- our values as people and our values as a nation.
Mattis wrote that never did he dream the oath to preserve the Constitution that he and other service members took would be used " to violate the Constitutional rights of their fellow citizens -- much less to provide a bizarre photo op for the elected commander-in-chief, with military leadership standing alongside."
Tweeting his response late Wednesday, Trump mocked Mattis as "the world's most overrated General" and said "the only thing Barack Obama and I have in common is that we both had the honor of firing Jim Mattis.
"Glad he is gone!" Trump added noting that he "he didn't like his 'leadership' style or much else about him" and said "his primary strength was not military, but rather personal public relations."
"We must reject any thinking of our cities as a "battlespace" that our uniformed military is called upon to "dominate," Mattis wrote in an apparent reference to current Defense Secretary Mark Esper, who recently used that term in a conference call with governors.
"We know that we are better than the abuse of executive authority that we witnessed in Lafayette Park. We must reject and hold accountable those in office who would make a mockery of our Constitution," he continued.
"At the same time, we must remember Lincoln's "better angels," and listen to them, as we work to unite," he wrote. "Only by adopting a new path -- which means, in truth, returning to the original path of our founding ideals -- will we again be a country admired and respected at home and abroad."
Mattis' rare public comments about Trump are a major shift for a man who has always maintained he would remain apolitical, as he did during his distinguished Marine career.
"It was an honor to serve under Secretary Mattis in the Pentagon, both as an American and as a former United State Marine," said Mick Mulroy, an ABC News contributor who served as the deputy assistant secretary of defense for Middle East policy.
"He exemplifies the ethos of service before self and the principle that military officers should be apolitical," said Mulroy. "I believe he was apolitical as secretary and is now. It was probably a difficult decision to write this statement and that makes it even more important."
This report was featured in the Thursday, June 4, 2020, episode of “Start Here,” ABC News’ daily news podcast.
"Start Here" offers a straightforward look at the day's top stories in 20 minutes. Listen for free every weekday on Apple Podcasts, Google Podcasts, Spotify, the ABC News app or wherever you get your podcasts.