The suspect travelled in Spain using his van "as a mobile computing office, equipped with various antennas to scan frequencies", an interior ministry statement said.
Agents arrested him Thursday in the city of Granollers, 35km north of Barcelona, complying with a European arrest warrant issued by Dutch authorities.
He is accused of attacking the Swiss-British anti-spam watchdog group Spamhaus whose main task is to halt ads for counterfeit Viagra and bogus weight-loss pills reaching the world's inboxes.
The statement said officers uncovered the computer hacker's bunker, "from where he even did interviews with different international media".
The 35-year-old, whose birthplace was given as the western Dutch city of Alkmaar, was identified only by his initials: SK.
The statement said the suspect called himself a diplomat belonging to the "Telecommunications and Foreign Affairs Ministry of the Republic of Cyberbunker."
Spanish police were alerted in March by Dutch authorities of large denial-of-service attacks being launched from Spain that were affecting internet servers in the Netherlands, United Kingdom and the US. These attacks culminated with a major onslaught on Spamhaus.
The Netherlands National Prosecution Office described them as "unprecedentedly serious attacks on the non-profit organisation Spamhaus".
The largest assault clocked in at 300 billion bits per second, according to San Francisco-based CloudFlare, which Spamhaus enlisted to help it weather the onslaught.
Denial-of-service attacks overwhelm a server with traffic, jamming it with incoming messages. Security experts measure the attacks in bits of data per second. Recent cyberattacks - such as the ones that caused persistent outages at US banking sites late last year - have tended to peak at 100 billion bits per second, one third the size of that experienced by Spamhaus.
Netherlands, German, British and US police forces took part in the investigation leading to the arrest, Spain said.
The suspect is expected to be extradited from Spain to face justice in the Netherlands.