The New York District Attorney sent a subpoena to the microblogging site demanding that it reveals three months' worth of posts made by arrested Occupy activist Malcolm Harris.
However, Twitter responded by filing a ten-page report against the order, stating that tweets belong to the account holder alone under the terms of its user agreement.
Twitter's lawyer Ben Lee said: "Twitter's terms of service make absolutely clear that its users 'own' their own content. Our filing with the court reaffirms our steadfast commitment to defending those rights for our users."
The social network also claims that the District Attorney's request is unlawful because it was not backed by a search warrant.
Last year, Twitter was forced to reveal personal details of some of its users during the Ryan Giggs sex scandal.