The 30-year-old singer's post was in response to Trump's tweet about the ongoing protests in Minneapolis following the death of George Floyd, an African American man who died while being arrested by police.
His post was hidden by the social media platform after Twitter said it violated the site's rules.
READ MORE: Twitter censors Donald Trump's 'violent' tweet amid executive order
A spokesperson for Twitter told Deadline: "The Tweets violate our policies regarding the glorification of violence based on the historical context of the last line, its connection to violence, and the risk it could inspire similar actions today."
The spokesperson added: "We've taken action in the interest of preventing others from being inspired to commit violent acts, but have kept the Tweet on Twitter because it is important that the public still be able to see the Tweet given its relevance to ongoing matters of public importance."
Swift is the fifth most followed person on Twitter, with 86.1 million followers - 6 million more than the President.
The singer previously remained silent on politics before becoming more outspoken about her beliefs in 2018.
According to The Washington Post, Swift made a U-turn before the 2018 midterm elections, when she posted a lengthy statement in which she criticised Tennessee representative Marsha Blackburn and revealed she was voting for a Democratic candidate.
Her Netflix documentary Miss Americana revealed her team had tried to persuade her not to speak out.
"I'm sad I didn't [speak out] two years ago, but I can't change that," she said, referencing the 2016 US Presidential election.
"I need to be on the right side of history," she said.
"If I get bad press for saying, 'Don't put a homophobic racist in office,' then I get bad press for that. I really don't care."