In a filing with the 2nd US Circuit Court of Appeals in Manhattan, the Department of Justice said Trump qualified as a typical "employee of the government" entitled to immunity under federal law from Carroll's claims, and was also shielded because he spoke about her in his capacity as president.
The law "provides a broad grant of immunity" to Trump, the Justice Department said, echoing arguments the president has made in other litigation.
Carroll, a former Elle magazine columnist, sued Trump in November 2019 after he denied having raped her in a Manhattan department store in mid-1990s. Trump said Carroll made up the story to sell a new book, and added: "She's not my type."
A lawyer for Carroll had no immediate comment, having yet to review the filing.
Trump is appealing US District Judge Lewis Kaplan's Oct. 27 refusal to drop Trump from the case. A reversal would likely doom Carroll's defamation claim.
It is unclear whether the Justice Department will pursue the case on Trump's behalf after the Jan. 20 inauguration of President-elect Joe Biden, the Democrat who defeated Republican Trump in the November election.
Trump also faces other legal threats after leaving office, including criminal and civil probes in New York into his business dealings.
Carroll has said she would wait until after the appeal to depose Trump, and to collect a DNA sample to compare against a dress she said she wore when Trump allegedly assaulted her.
Trump has denied claims of several women who accused him of sexual misconduct.