The latest confrontation was prompted by a strongly-worded statement issued by General Mattis on Wednesday night
Twitter has accused the US President of making false claims, in one of the app's own articles covering the news.
The move - which effectively accuses the leader of lying - refers to a tweet by Donald Trump about his first defence secretary, reports the BBC.
Donald Trump had tweeted that he had given James Mattis the nickname "Mad Dog" and later fired him.
But Twitter's article says that the former general resigned, and his nickname preceded Trump's presidency.
It follows last week's explosive confrontation, which saw Twitter fact-check two of President Trump's tweets and label another as glorifying violence.
The latest confrontation was prompted by a strongly-worded statement issued by General Mattis on Wednesday night, in which he criticised the president's handling of the protests that followed the killing of George Floyd.
Gen Mattis described Donald Trump as "the first president in my lifetime who does not try to unite the American people - does not even pretend to try. Instead, he tries to divide us."
The US president fired back quickly in a tweet saying that the one thing he and predecessor Barack Obama had in common was "we both had the honour of firing Jim Mattis, the world's most overrated general. I asked for his letter of resignation and felt good about it".
"His nickname was 'Chaos', which I didn't like, and changed it to 'Mad Dog'," he added.
Twitter later published what it calls a Moment, a summary of a news story that you can see when you press the platform's search button.
It has also been promoted within the What's Happening box that appears on Twitter's website.
The article says that "Mattis resigned from the position... after the administration decided to withdraw US troops from Syria", and attributes the fact to a report by the Associated Press news agency.
It then refers to journalists at CNN, the National Review, the Washington Post and The Dispatch as having written that the nickname 'Mad Dog' had been used before Trump's presidency, with published references dating back to 2004.
Moments are curated by an internal team at Twitter. They provide a summary of a recent development before presenting some related tweets.
This is not the first time the tool has been used to call out Donald Trump.
In March 2019, it said the president had misidentified a co-founder of Greenpeace, and in April 2020 it said he had falsely claimed he could force states to reopen during the Covid-19 pandemic.
But what is interesting here is that Twitter has chosen to raise the temperature of its clash with the president over what could be seen as a relatively minor issue.