Khalil, who has a residence permit and is married to an American, was one of the leading figures in the pro-Palestinian student protests at Columbia University in New York last year. He was arrested on March 8 this year without being charged with a crime.
The Trump administration wants to deport him and believes that his presence in the country risks having "serious consequences" for the US foreign policy.
The lawsuit was filed on Thursday and according to Khalil, he wants to show that he cannot be silenced.
They are abusing their power because they think they are untouchable, says the 30-year-old Khalil to AP.
If they do not feel that there is any form of accountability, it will continue.
Khalil states that he plans to share any potential damages with others who have been affected by the Trump administration's actions against activists.
The rights organization representing him says in a statement that instead of compensation, he may consider an apology and that the government abandons its "unconstitutional" migration policy.
According to the lawsuit, the detention was intended to "terrorize him and his family". Khalil has stated that he was served inedible food during the 104-day detention and was forced to sleep under lit lamps.
Due to the detention, he could not be present when his first child was born.
Mahmoud Khalil was released after a federal judge ordered it against a bail of one dollar.