Under current regulations, Twitter cannot reveal certain information about government requests for users' data relating to national security.
Twitter argues that this violates the right to free speech, as defined by the First Amendment to the US Constitution.
The firm said it brought the case in an effort to force the government to be more transparent about personal data requests.
"It's our belief that we are entitled under the First Amendment to respond to our users' concerns and to the statements of US government officials by providing information about the scope of US government surveillance," Twitter's lawyer, Ben Lee, wrote in a blog post.
Twitter brought the action against the US Department of Justice and the Federal Bureau of Investigation in a northern California court on Tuesday.
In April, Twitter submitted a Transparency Report to the US government for publication; however, so far officials have denied the firm's request to share the full report with the public.
That report includes specific information about the nature and number of requests for Twitter user information relating to national security.
"The US government engages in extensive but incomplete speech about the scope of its national security surveillance activities as they pertain to US communications providers, while at the same time prohibiting service providers such as Twitter from providing their own informed perspective as potential recipients of various national security-related requests," wrote Twitter.'Obligation to protect'
Although Twitter receives significantly fewer government requests than rival technology firms such as Google, the American Civil Liberties Union said the suit might spur others to act.
"We hope that other technology companies will now follow Twitter's lead," said Jameel Jaffer, American Civil Liberties Union deputy legal director, in a statement.
"Technology companies have an obligation to protect their customers' sensitive information against overbroad government surveillance, and to be candid with their customers about how their information is being used and shared."
Several of the largest US tech firms have been fighting government requests for their users' private data, including Microsoft, Google, Facebook and Dropbox.
Others, such as Apple, have taken steps to circumvent US government requests by encrypting user data in a manner that puts it beyond the reach of law enforcement.