The myeloid differentiation factor 88 (MyD88) is an essential adapter in Toll-like receptor (TLR) signalling pathways, with TLR the first pattern-recognition receptor (PRR) that was discovered in Drosophila. In the present study, a MyD88 gene was identified and characterized from a commercially important shellfish, Scapharca subcrenata, including a DEATH domain and TIR domain conserved within other molluscs. Furthermore, comparative genomic evidence revealed that MyD88 was of different lengths and contained quantitative exon and intron regions, which might be involved in specific mechanisms. To further explore the phylogenetic relationships of invertebrate metazoan MyD88, we applied MrBayes and PhyML software to construct phylogenetic trees using Bayesian and maximum likelihood approaches, respectively, which suggested that the MyD88 of Arthropoda was closely related to lower invertebrates, in contrast to morphological taxonomy. Finally, we investigated the evolutionary patterns and location of positive selection sites (PSSs) in the MyD88 gene from Arthropoda, Mollusca and Insecta using PAML software with the maximum likelihood method. The data showed that positive selection sites were detected in these groups, and partial sites were located in the TIR domain but were not found in the DEATH domain. To summarize, in this study, we report on the diversification of MyD88 in invertebrate metazoans, the specific evolutionary position of Arthropoda MyD88, and the positive selection pressures on MyD88 of Arthropoda, Mollusca and Insecta. These results are a valuable contribution to understand and clarify the evolutionary pattern of TLR/MyD88 signalling pathways in invertebrate and vertebrate taxa.