The court ruled that the president's bid to stand for another term "by direct universal suffrage for five years, is not contrary to the constitution of Burundi," the judgement signed by six out of seven judges read.
The decision came hours after its vice-president refused to sign the ruling, and fled the country instead.
Judge Sylvere Nimpagaritse told AFP that the court's judges had come under "enormous pressure and even death threats" from senior figures, which he refused to name, to rubberstamp the president's disputed candidature.
Before the court ruling on Tuesday morning, protesters had once again defied police to demonstrate against the president's effort to extend his rule, after more than a week of running battles in which at least 13 people have been killed.
But following the court's ruling the vice-president offered an olive branch, promising to release hundreds of protesters and reopen radio stations if the demonstrations stop.
"To create a climate of appeasement, the government is willing to release the young people who were arrested," said first vice-president prosper Bazombanza.
He also offered to lift arrest warrants issued against key civil society leaders and reopen independent radio stations, provided that "protests and the insurrection stop."
Nimpagaritse, the judge who fled, claimed that a majority of the court's seven judges believed it would be unconstitutional for Nkurunziza to stand again, but had faced "enormous pressure and even death threats" to force them to change their mind.
The president, a former rebel leader from the Hutu majority who has been in power since 2005, has come under intense international pressure to withdraw from the June 26 presidential poll.
US Secretary of State John Kerry warned Monday that he was "deeply concerned" about Nkurunziza's decision to stand again, which he said "flies directly in the face of the constitution".
Burundi's senate -- controlled by the president's CNDD-FDD party -- had asked the court to decide the issue.
"In my soul and conscience I decided not to put my signature to a ruling, a decision which is clearly not lawful that would be imposed from the outside, and which has nothing legal about it," Nimpagaritse told AFP before leaving the country.
Burundi, where a 13-year civil war between Tutsis and Hutus ended only in 2006, has been rocked by violent protests since the CNDD-FDD designated Nkurunziza to stand in what critics say is in defiance of the constitution and the Arusha accords which ended the war.
Nkurunziza's supporters say he is eligible to run again since his first term in office followed his election by parliament -- not directly by the people as the constitution specifies.
Police said 15 officers were wounded on Monday alone after a grenade was "thrown by protesters", while Burundi's Red Cross said 46 protesters were wounded.
Witnesses said other protesters had been shot, with police apparently giving no warning before opening fire with live ammunition.
Scores of demonstrators have been wounded since the protests began on April 26.
Nearly 600 people have also been arrested, according to police, with reports of many being beaten in custody.
The government linked a grenade attack that killed three people, including two police officers, in the early hours of Saturday to the opposition protests and branded the demonstrators "enemies of the state".
The country's powerful security forces appear divided over Nkurunziza's bid to hold onto power.
Neighbouring Rwanda has expressed its concern over the escalating political violence that has caused 30,000 people to flee as refugees into surrounding countries.
"While we respect Burundi's sovereignty in addressing internal matters, Rwanda considers the safety of innocent population as a regional and international responsibility," Foreign Minister Louise Mushikiwabo said in a statement late Monday.
Mushikiwabo said she was concerned at "reports" violence was linked to ethnic Rwandan Hutu rebels of the Democratic Front for the Liberation of Rwanda (FDLR) whose presence in neighbouring Democratic Republic of Congo has been used by Rwanda to justify repeated cross-border incursions.