A judge at the National Court in Madrid "has just ordered the immediate release of Brett and Naghemeh King" after British prosecutors withdrew their extradition order, the source told news agency AFP.
Five-year-old Ashya is currently receiving treatment at a hospital in Malaga. His parents, Brett and Naghemeh, had been in custody in a prison near Madrid.
They were detained after they took their son out of a hospital in Southampton, southern England, last week, prompting British police to apply for an arrest warrant for them over fears that his condition could drastically deteriorate.
The parents were detained on Saturday but the case has prompted an outcry in Britain, where some 130,000 people have signed a petition calling for the boy to be reunited with his parents.
The Crown Prosecution Service (CPS), which oversees criminal prosecutions in England and Wales, confirmed it was dropping the arrest warrants against the Kings.
"No further action will be taken against Mr and Mrs King and we are now in the process of communicating this decision to the Spanish authorities so that they can be reunited with their son as soon as possible," the CPS added in a statement.