Myogenesis is a several step process that requires genes involved in specifying mesoderm lineage and genes involved in determining muscle identity, differentiation, and patterning. We report here on the isolation, characterization, and expression pattern of a cDNA clone encoded by the previously uncharacterized Drosophila muscle segment homeobox (msh) gene and its possible role in myogenesis. The amino acid sequence of the msh homeobox domain is highly homologous to the homeodomains of the Drosophila S59 and empty spiracles genes and the Hox 7 and Hox 8 family of vertebrate homeobox genes. In addition, the 5' end of msh has 52% sequence identity to the 5' end of the empty spiracles gene and encodes several stretches of amino acids rich in serine, alanine, proline, glutamine, and acidic amino acids, indicating potential domains of regulatory activity. The expression of msh is initially detected at about stage 6 in the dorsal lateral ectoderm of the embryo and later in the developing central (CNS) and peripheral nervous systems. During germ band retraction (stage 12), msh continues to be expressed in cells of the nervous system as well as cells of the somatic mesoderm corresponding mostly to the developing dorsal and lateral somatic body wall muscles. These mesodermal cells, which continue to express msh in daughterless mutant embryos, undergo an increase in cell number in neurogenic mutants. By late stage 14 of embryonic development, msh expression is greatly reduced or absent in most or all mesoderm and muscle but continues in CNS until hatching. Ectopic expression of msh in the mesoderm results in altered expression of the S59 and nau/Dmyd genes leading to a loss of some muscles and defects in the patterning of others, suggesting that the muscle defects are at the level of recruitment and/or patterning of muscle precursor cells. Thus the similarity of Drosophila msh expression to that of the homologous vertebrate Hox 7 and Hox 8 genes together with the effects of ectopic expression of msh in the mesoderm suggest a role for the msh-like family of genes in mesodermal and muscle differentiation and patterning.