The killer grabbed the child from behind as she cycled to a metro station in Taipei with her mother to meet relatives on Monday, police said.
Pushing away the mother of the girl, who had rushed forward to save her daughter, he beheaded the child with a kitchen knife.
Seven bystanders were unable to stop the man, who was arrested at the scene, police added.
The girl has been identified only by the surname Liu.
Taiwan's Apple Daily reported that he was unemployed and living with his parents, and had previously been hospitalised with mental health issues.
The case, the second child killing in Taipei in less than a year, has sparked widespread public anger and criticism of calls to abolish the death penalty.
Following the attack, parliament announced today it would bring forward a review of a bill that would ensure those convicted of killing children under 12 were given the death penalty, and at minimum a life sentence in the case of severe mental illness.
"I am deeply saddened by the case ... (the suspect) should be sentenced to death in the case of a stranger killing a child," Wang said in a statement posted on Facebook.
The White Rose Social Care Association is planning to hold a mass rally in Taipei on April 9 to push for enforcement of capital punishment in the wake of the crime.
"This kind of random killing shows that Taiwan cannot afford to abolish the death penalty," said Eva Liang, chairwoman of the association.
Television footage yesterday showed dozens of angry people gathering outside a police station in Taipei.
Some attacked the suspect as he was being transferred to the prosecutor's office for questioning. He pleaded with them to "stop beating".
