The Council of State's ruling against the resort of Villeneuve-Loubet is expected to set a precedent for the dozens of French towns that have also laid down such bans.
It said Villeneuve-Loubet's ban had "seriously infringed, in a manner that was clearly illegal, fundamental liberties such as the freedom to come and go, religious freedom and individual freedom."
The burkinis did not pose any threat to public order, said the council, which is France's highest administrative court.
The ban had been imposed on the grounds that wearing burkinis contravened French laws on secularism.
It followed a series of deadly attacks by Islamist militants in Paris, Nice and elsewhere in the past 20 months that shocked the world but also raised questions about the place of France's large Muslim and Arab population in its society.
Many conservatives and right-wing French supported the burkini ban, with some calling for it to be extended nationwide, while civil liberties campaigners, feminists and Muslims opposed it. The debate was fuelled by footage of police trying to enforce the ban on a woman on the beach in Nice.
Reacting to the court ruling on Friday, Prime Minister Manuel Valls, a Socialist, said that France needed a modern, secular Islam and wearing a burkini clashed with that idea.
"The Council of State ruling does not close the debate on the burkini," Valls said on Facebook. "Denouncing the burkini is not calling into question individual freedom.. .It is denouncing deadly, backwards Islamism."
The issue has filtered into early campaigning for the presidential election in April 2017, making French cultural identity as well as security a hot issue in political debates.
Former President Nicolas Sarkozy on Thursday launched his comeback bid on a hardline law and order platform.