One of the crew members tried to set fire to the boat when a Spanish navy ship with police on board neared the sailboat about 500 nautical miles from Spain's Canary Islands, the ministry said in a statement.
"As the team of special agents approached, one of the crew members who was at the helm of the vessel tried to manipulate the motor, producing a great deal of smoke, to set fire to the sailboat and avoid the seizure of the drugs," it said.
A police search of the boat found the cocaine hidden inside the walls of the cabins.
The authorities gave no estimate for the market value of the drugs.
Police arrested a third man, a Spanish national, in Marbella, an upmarket holiday resort in southern Spain, as part of the investigation which was carried out in cooperation with Britain's National Crime Agency.
The three are suspected of belonging to a French-Spanish group which specializes in smuggling cocaine from South America to Europe.
Spain is a key entry point for drugs bound for Europe. Spanish authorities seized more than 20 tonnes of cocaine last year, which accounted for 41 percent of the total amount of cocaine seized in Europe in 2012.