The laboratory in Alcala de Henares, 35km northeast of the Spanish capital, was one of four locations raided as part of an operation that has so far resulted in 35 arrests.
The other properties were in Zarauts, Hernani and San Sebastian in the Basque Country.
€9,000 in cash, 2 kilograms of cocaine and machinery to cut drugs and stamp logos on drug containers were seized according to a police statement issued on Monday.
The operation began several months ago when agents discovered a man from the Dominican Republic selling the drug in Pamplona.
Investigations revealed that the cocaine had been supplied by Colombian criminals who controlled much of the cocaine market in the Valencian town of Gandia.
By working with French police, Spanish agents identified a man who was supplying drugs from the Madrid laboratory to dealers in the south of France between Bordeaux and Hendaye, as well as to those investogated in the Basque Country, Valencia and Navarra.
The first phase of the investigation has so far resulted in 20 raids, 35 arrests for drug-dealing and the seizure of €32,000 in cash, 13 kilograms of cocaine, 150 grams of marijuana, 19 grams of hashish, a replica pistol and drugs manufacturing equipment.