His arrest, the product of an extensive police investigation, came in the early hours of Wednesday morning, Spain's Interior Minister Jorge Fernández Díaz said in a press conference on Wednesday.
The 42-year-old man is a Madrid resident of Spanish nationality but his identity remains unknown.
The suspect is thought to have kidnapped and abused at least five children in Madrid's Ciudad Lineal since September 2013. There had been three further attempted kidnappings, the interior minister said.
In at least two of the cases in question, children were taken to an apartment where they are thought to have been sexually abused. The paedophile then washed the children and returned them to the locations several kilometres from where they had been taken.
Police said they were now planning to search two apartments belong to the man's family as they continued their investigations.
The suspect in detention has a criminal record including prior convictions for sexual assault, kidnapping and armed robbery, Fernández Díaz said.