A man who had checked in the luggage in the Spanish capital was detained for questioning at the airport of Las Palmas, police said in a statement, without giving further details.
The luggage contained species often sold as exotic pets: a boa constrictor, a python molurus, found in Southeast Asia, and three python regius, a species found in Africa.
It also contained two leopard gecko lizards, a species naturally found in the deserts of Asia, two frogs and 200 dubia cockroaches which are normally found in Central and Southern America.
The suitcases also contained 3,500 crickets, about 1,000 worms, 100 grasshoppers and several snails.
The snakes, frogs, lizards, snails and cockroaches were kept in plastic containers while the crickets, worms and grasshoppers were stored in cardboard boxes.