The Freedom Party had challenged the result, saying that postal votes had been illegally and improperly handled.
Norbert Hofer lost the election to the former leader of the Greens, Alexander Van der Bellen, by just 30,863 votes or less than one percentage point.
The election will now be re-run.
Announcing the decision, Gerhard Holzinger, head of Austria’s highest court, said: “The challenge brought by Freedom Party leader Heinz-Christian Strache against the May 22 election… has been upheld.”
In two weeks of hearings, lawyers for the Freedom Party argued that postal ballots were illegally handled in 94 out of 117 districts.
The party alleged that thousands of votes were opened earlier than permitted under election rules and some were counted by people unauthorised to do so.
It also claimed to have evidence that some under-16s and foreigners had been allowed to vote.
In its ruling, the Constitutional Court said election rules had been broken in a way that could have influenced the result.
However, it said there was no proof the count had been manipulated.
If elected, Norbert Hofer will become the first far-right head of state of an EU country.
The Freedom Party has based its election campaigns around concern over immigration and falling living standards for the less well-off.
After Brexit, Norbert Hofer said he favored holding a similar referendum in Austria if the bloc failed to stop centralization and carry out reforms “within a year”.
On June 26, he told the Oesterreich newspaper: “If [the EU] evolves in the wrong direction, then in my opinion the time has come to ask the Austrians if they still want to be part of it.”
Norbert Hofer’s opponent, Alexander Van der Bellen, is strongly pro-EU and has spoken of his dream for a border-free “United States of Europe”.
Following the court’s order to re-run the vote, President Heinz Fischer will be replaced on a temporary basis by three parliamentary officials, including Norbert Hofer.
The new election is expected to be held in September or October.
Austria’s president has a mostly ceremonial role.
However, the president does have the power to dissolve the National Council – the more powerful lower house of parliament. That triggers a general election.
The president can only do that once for a particular reason – he cannot use the same grounds to dissolve it again.
It is the chancellor’s job to appoint government ministers. And the chancellor has the power to dismiss the government. But ministers have to be formally sworn in by the president.
At least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…