Police rushed to the scene in the Spanish capital's Usera district after a woman threatened to throw herself out of her apartment window.
When they arrived, officer find a two-year-old child in cardiac arrest. His hands and feet had been tied with duct tape while he had been stabbed several times, police said.
Attempts to revive the toddler were unsuccessful, Spain's ABC newspaper reported.
The child's 41-year-old mother was in serious condition, after taking a large number of pills.
Police are now investigating the crime, and suspect the mother killed her child.
The boy's father has been informed and was seen by psychologists.