An i-type lysozyme (MmeLys) has been proved to function in immunity of the clam Meretrix meretrix in our previous studies. In this study, the expression patterns of MmeLys mRNA and protein at four chief developmental stages of M. meretrix were analyzed, which was able to provide information about how ontogeny of immunity and, in particular, antibacterial ability occured in the bivalve. The results of real-time PCR and western blot showed that MmeLys expressions were activated in D-veligers and dramatically increased to the highest level in pediveligers. It is proposed that the expression changes at these two stages might be due to the visceral organs changes, which were related to the archenteron formation in D-veligers and the organ-restructuring in pediveligers during metamorphosis. In addition, new methods of whole mount in situ hybridization and whole mount immunofluorescence were applied to identify the MmeLys expression tissues, and these tissues (i.e. hepatopancreas, gill, mantle, mouth, velum and foot) may be involved in the immune function during development of clams. Our study is valuable to a certain extent for exploring the origin of immune functions in clams and provides new methodology for future studies on the immune ontogeny of bivalves.