The Madrid court said Monday the exhumation aimed "to get samples of his remains to determine whether he is the biological father of a woman from Girona (in northeastern Spain) who filed a claim to be recognised as the daughter of the artist."
"The DNA study of the painter's corpse is necessary due to the lack of other biological or personal remains with which to perform the comparative study," it added.
The court said the decision could be appealed.
A spokesman for the court said the woman who claims to be Dalí's daughter is called Pilar Abel, but refused to give any further details.
Dalí is buried in his eponymous museum in Figueras, a city in the northeastern region of Catalonia where he died in January 1989 of heart failure after a life marked by the genius of his work and his own
eccentricities and extravagances.
According to a media report in Catalonia's La Vanguardia daily, Abel is a psychic.
She says her mother had an affair with Dalí when she worked as a nanny for another family that vacationed in Cadaques, a fishing village of white houses where the painter lived and worked for years with his muse Gala.
Born on May 11, 1904 in Figueras to a bourgeois family -- his father was a legal clerk -- Dalí developed an interest in painting from an early age.
In 1922 he began studying at the Fine Arts Academy in Madrid, where, despite being expelled twice, he developed his first avant-garde artistic ideas in association with poet Federico Garcia Lorca and the filmmaker Luis Buñuel.
Soon he left for Paris to join the surrealist movement, giving the school his own personal twist and rocketing to fame with works such as "The Great Masturbator."
Dalí also made forays into the world of surrealist filmmaking.
Returning to Catalonia after 12 years, he invited French poet Paul Eluard and his Russian wife Elena Ivanovna Diakonova to Cadaques.
It was love at first sight between Dalí and the woman to whom he gave the pet name Gala. She became his muse and remained at his side for the rest of her life.
During the Spanish Civil War of 1936-39, Dalí took refuge in Italy.
The outbreak of World War II in 1939 saw Dalí move to Arcachon, on the southern French Atlantic coast, but he left once the German army invaded France the following year and placed himself in self-imposed exile in the United States until 1948 when he and Gala returned to Spain.
Much later in 1982, he was shattered, on both a human and artistic level, by the death of Gala and after a seven-year physical and mental battle to give renewed meaning to his existence, Dalí himself died in 1989 in a Figueras clinic.
By Laurence Boutreux / AFP