A 66-year-old man with a broken leg was arrested at Barcelona airport after his "cast" was found to be made of cocaine.
Police said the Chilean man had six cans of beer and two hollowed-out stools that also contained cocaine.
Officers were investigating whether the injuries were inflicted intentionally "to facilitate trafficking through security checks", police said.
Spain is a key entry point into Europe for cocaine from South America and airport officials pay close attention to flights arriving from the continent.
The drugs were discovered after police sprayed the cast with a chemical that turns bright blue when it comes into contact with cocaine, police spokesperson Jose Antonio Nin said.
Along with the cocaine in the cans and the small stools, he was carrying a total of 4.85 kilograms of the drug.
X-rays showed the man was suffering from an "open fracture of the tibia and the fibula, and has been transferred to a clinic for an operation", the police statement said.
"Investigators are examining the possibility that these injuries were brought about voluntarily ... to facilitate trafficking through security checks."