A regional court in Frankfurt found that Uber's business model, which relies heavily on the use of vehicles from local car rental companies in Germany, violated several anti-competition laws.
The judges said Uber should have a rental car license of its own because it was more than just a go-between connecting drivers and customers.
“From the passenger's point of view, Uber is providing the service,” said judge Annette Theimer, pointing out that Uber set the prices and could pick the drivers.
The court also accused Uber of “not adequately checking” the car hire companies it works with, noting that not all drivers returned to their head office in between rides as legally required.
The ban is effective immediately but can still be appealed by Uber.
It is the latest blow to Uber in Germany, where a court in 2015 banned it from letting non-professional drivers offer rides in their own cars.
The federal association of taxis and rental cars welcomed the verdict, saying the court “had made it clear that Uber's system is illegal in Germany”.
But Uber insisted customers could still use the app and said it would look at making changes to its business model to comply with the ruling.
“We will look at it closely and adapt our offer if necessary so we can continue to be there for our users and drivers,” tweeted Tobias Fröhlich, head of communications for Uber in Germany.
The Californian firm has long faced an onslaught of legal challenges in Europe, where taxi drivers have furiously accused it of not playing fair.
The popular app last month lost its London licence over what authorities called an “unacceptable” safety risk for passengers, after finding that trips had taken place with unlicenced, suspended or dismissed drivers.
Uber has vowed to appeal and continues to operate in London in the meantime.
In France earlier this month, an appeals court in Paris found Uber guilty of “unfair competition” and ordered it to pay a fine to taxi firm Viacab.