It comes after the president sent a barrage of angry tweets ordering the country to free the rapper after he was charged with assault.
Sweden said that Mr Trump's tweets will not help free the rapper because the country's judicial system is independent from politics.
The Swedish government said that it had repeatedly told the US president that his interventions would not help. But Mr Trump continued to tweet, with his latest post including an angry outburst at the country.
Best known for his song "Praise the Lord", the 30-year-old performer, producer and model, whose real name is Rakim Mayers, was detained about three weeks ago following a street altercation with two men in Stockholm on June 30. A$AP Rocky, who was charged on Thursday, will go on trial next week.
Trump, who last week urged Swedish Prime Minister Stefan Lofven to free A$AP Rocky, fired off tweets on Thursday saying he was "very disappointed" in Lofven and demanding: "Treat Americans fairly!"
Trump added: "We do so much for Sweden but it doesn't seem to work the other way around. Sweden should focus on its real crime problem! #FreeRocky."
A spokesman for the Swedish government said on Friday the government would not get involved in the case.
"Sweden and Prime Minister Stefan Lofven have been very clear in the dialogue with both the White House and directly with the American president, that in Sweden everyone is equal before the law and that the government cannot interfere in legal proceedings," the spokesman said in a text message.
Mayers has said he is innocent and that the men provoked him and his two companions, who have also been charged with assault. If convicted, they could face up to two years in jail.
Trump has said he would personally vouch for Mayers' bail. Sweden does not have a bail system.
Former prime minister Carl Bildt told the daily Aftonbladet that Lofven was right not to comment further on the case.
"I think it's right of the government not to go into a mud wrestling match with Trump. That is his element, and should not be Sweden's," Bildt said.
Mayers, also known by the pseudonym Lord Flacko, was in Stockholm to perform at the Smash hip-hop festival. His arrest forced him to cancel a dozen shows scheduled as part of his Europe tour.
Additional reporting by Reuters
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies