A routine check on an unnamed Maersk containership in Mexico uncovered 23 tonnes of the deadly painkiller fentanyl.
Mexican media said the drug was contained in 931 bags disguised as a cargo of calcium chloride, which is used in road salt.
The ship had arrived from China last month.
The painkiller is up to 50 times stronger than heroin and is responsible for a growing number of deaths worldwide.