Housefly, Musca domestica, has a complicated immune system. However, its underlying operating mechanism remains elusive. Candida albicans is a major pathogen affecting humans by causing deep infection fungous disease, but it is non-symbiotic in houseflies. To investigate the C. albicans infection process in housefly, the changes in morphological and histological and expression patterns of antimicrobial peptide were monitored to indicate the insect's response to fungal infection. The results showed that scattered brown spots were comprising melanized encapsulation and encapsulated fungal cells were initially observed at the inner side of larvae's body wall 3 h postinfection (PI). Between 6 and 36 h PI, the whole body of larvae was densely covered with the brown spots, which then gradually disappeared. The majority had disappeared at 48 h PI. Some fungi colonized in the gaps between the body wall and the muscle layer, as well as among muscle fibers of the muscle layer at 12 h PI and hyphal was observed at 18 h PI. These fungi colonized distribution changed from a continuous line to scattered spots at 24 h PI and virtually disappeared at 48 h. The results of quantitative PCR analysis revealed that in coordination with the variation during the infection, the expression levels of four antimicrobial peptides were up-regulated. In conclusion, C. albicans infection in M. domestica larvae involved the following stages: injection, infection, immune response and elimination of the pathogen. The rapid response of antimicrobial peptides, melanized encapsulation and agglutination played a vital role against the pathogenic invasion.