The 69-year-old was arrested by police in the town of Tamesloht, 15 kilometres (nine miles) from Marrakech, the daily Assabah reported.
According to the Akhbar al-Yaoum newspaper, the man's "suspicious" behaviour attracted the attention of authorities, who discovered the boy hidden beneath the seats of his car.
Witnesses told Assabah that the man had been seen frequenting local play areas and schools where he came into contact with minors.
Morocco has been afflicted by a number of paedophile cases in the past year.
A Frenchman accused of "raping minors" is expected in court on Thursday, and a Briton was jailed in May for 20 years for kidnapping and attempting to rape three young girls.
In addition, a 60-year-old Frenchman was jailed for 12 years last year for child sex offences.
Last July, a Spanish paedophile serving a 30-year sentence for raping 11 children was mistakenly freed under a royal pardon along with dozens of other Spaniards in Moroccan jails, sparking outrage across the kingdom.