Almost $1 million and 11 guns were also taken from the unit as part of a National Anti-Gang Squad operation.

The yacht is due to undergo forensic examination.

"The seizing and subsequent transporting of the yacht to the mainland has required specialist assistance from the Australian Border Force," a WA Police spokesman said.

"It is not known how long the forensic examination will take to complete, however the search will be conducted by specialist members of the WA Police, WA National Anti-Gangs Squad, and the Australian Border Force."

Two men who were onboard the yacht appeared in Karratha Magistrates Court on Thursday charged with possession of drugs with intent to sell or supply.

The ABC understands the men had been sailing into the country from Indonesia.

Another four men on the yacht were released without charge.

Another man, a member of the Coffin Cheaters motorcycle gang, has been charged with offences relating to the cash and guns.