32-year-old Harris, who split with Swift shortly before she struck up a new relationship with actor Tom Hiddleston, said he was "hurt" by reports that the lyrics to his latest Rihanna collaboration "This Is What You Came For" had been written by her under the pseudonym "Nils Sjoberg".
Saying he would have happily given her full credit, he took to Twitter to protest against 26-year-old Swift's team attempting to make him "look bad" in public.
"I wrote the music, produced the song, arranged it and cut the vocals though. And initially she wanted it kept secret, hence the pseudonym."
Harris went on to accuse the singer of "trying to tear your ex bf down" for "something to do", imploring her to focus on her relationship with Hiddleston instead.
More From This Section
"I figure if you're happy in your new relationship you should focus on that instead of trying to tear your ex bf down for something to do."
"Please focus on the positive aspects of YOUR life because you've earned a great one," he added.
He finished his rant with a cheery: "God bless everyone have a beautiful day."
The problem in the relationship came the day "This Is What You Came For" was released.
After recording a full demo, they agreed to keep the collaboration on the down-low, but Swift was hurt after Harris did an interview and said he couldn't foresee working with his then-girlfriend in the future.
The second was a retweet of Perry's own account, from May 9, 2015, in which she said: "Time, the ultimate truth teller."
The whole Twitter exchange saw the hashtag #TaylorSwiftIsOverParty trending, with fans of Harris coming out in support of him.
This comes after Swift and new boyfriend Hiddleston have been parading their new romance. Some fans have been less-than-impressed, accusing the pair of staging their romance for the cameras.