Uber has been in Denmark for less than three years. But competitors considered Uber's successful entry unfair to the country's 6,000 taxi drivers, who were already following stricter regulations.
Uber drivers would not be allowed to take cash or pick up passengers on the street.
Uber seems unwilling to adhere to the new requirements.
Minister for transport Ole Birk Olesen of the Liberal Alliance party said in an official statement that it was "unfortunate" that there was not majority support for a liberalising of taxi laws that would have made Uber's life easier.
The new law requires all taxis - which the ride-hailing app would be classified as - to have expensive seat sensors, video surveillance and taxi meters.
Uber said it would continue to try to persuade the government to change the rules, but in the meantime it is driving away.
Uber announced it is voluntarily pulling all its business from the country by April 18. One-upmanship with the law has never gone Uber's way thus far.
Rasmus Jarlov - one of Uber's biggest supporters in parliament - admitted that the taxi law that his party helped pass was part of the reason for Uber's departure. The case will come up in court by April-end. It will maintain its software division in Aarhus in northern Denmark where it employs 40 people. Like all other countries, it became extremely popular with users. Because the European Union is one of Uber's largest worldwide markets, a decision could mark a turning point in how the world generally regards the sharing economy. Those drivers would also be affected by a new law that sets a limit on issuing new cab licenses per quarter (125) that would dramatically curtail the addition of new drivers.