The company made the move after the DoJ filed a motion seeking dismissal of the ongoing case over the emails, withdrew the original warrant and issued a fresh warrant to Microsoft asking it to release the emails.
The release was sought under a new law, the CLOUD (Clarifying Lawful Overseas Use of Data) Act, that was signed into law by President Donald Trump on 23 March. The Act changed the existing law so that law-enforcement warrants apply to data stored anywhere by US-based tech firms.
The emails in question were initially sought by the Department of Justice in 2013, through a warrant issued under the Stored Communications Act, with the reported reason being that they were to do with a probe into drug trafficking.
In July 2016, the US Court of Appeals for the Second Circuit based in New York reversed this decision by the Southern District of New York court which had held Microsoft in contempt of court for refusing to hand over the customer emails.
And in January 2017, the US Court of Appeals for the Second Circuit, in a 4-4 decision, refused to rehear an appeal of its own decision.
The case then went to the Supreme Court which held its first hearing in February, with a verdict expected in June.
In its motion, filed on Tuesday, Microsoft said: "The government has now withdrawn the warrant that was at the centre of this dispute, and obtained a new warrant issued under the CLOUD Act. That action moots this case. Microsoft will, in the ordinary course, evaluate the new warrant as it evaluates all warrants that law-enforcement entities serve on it.
"Meanwhile, Microsoft agrees with the government that there is no longer a live case or controversy between the parties with respect to the question presented, which involves interpreting the prior version of the Stored Communications Act."