The child had not been vaccinated against the disease amid controversy over the potential side-effects of the jab, and had been fighting the bacterial infection for a month.
The Vall d'Hebrone hospital in Barcelona confirmed on its Twitter account "the death of a patient with diphtheria" who had been hospitalised at the end of May.
An infection that mostly affects the nose and throat, diphtheria is highly contagious but has become increasingly rare in western Europe in recent decades due to high rates of vaccination.
Nine other children and an adult were exposed to the bacteria but did not develop the disease, having all been vaccinated, according to health services in Spain's northeastern Catalonia region.
Also Read
The decision by the boy's parents not to vaccinate him has raised a fresh debate in Spain over the risks of the vaccine versus the risk of not having it.
"We are appealing to parents to have their children vaccinated," Catalonia's health chief Boi Ruiz told a press conference.
In France, the debate over vaccinations has surged anew after the death of a seven-month-old baby who had received two injections against whooping cough, hepatitis B, polio, tetanus and diphtheria.
According to the World Health Organization, in 2013 about 84 percent of infants worldwide were immunised against diphtheria, tetanus and whooping cough, all infectious diseases that can potentially be fatal. Severe reactions to the vaccine are extremely rare.