The boy was plugging in the fan at his home late on Monday when he suffered an electric shock.
According to Andalucía Información, the boy was touching the cables of the fan when he received the shock.
Neighbours reported hearing the screams of the mother and then saw the boy being carried from his home in the arms of his father, according to local newspaper La Provincias.
He was taken to a medical centre where he underwent CPR, but could not be saved.
Sources from the Centre for Information and Coordination of Emergencies told EFE that they believed the boy had been electrocuted.
A police forensic team are examining the electrical system in the house, the fan and the plug to determine where the fault lay.