Microsporidiosisis anopportunistic infection frequently diagnosed in immunocompromised patients. Microsporidiosis causes symptomatic or asymptomatic infections immunocompromised/immunosuppressed patients may experience severe and disseminated microsporidiosis. Fecal samples were taken from 186 patients with human immunodeficiency virus (86) and cancer (100). Microsporidia spp. were detected 27.9% (24/86) and 11.6% (10/86) in HIV + patients, 18% (18/100) and 7% (7/100) of cancer patients using polymerase chain reaction (PCR) and trichrome staining respectively. Enterocytozoon bieneusi was detected in 28(66.7%) patients, while Encephalitozoon intestinalis was detected in 10 (23.8%) patients. Encephalitozoon cuniculi was detected in only one patient, while Encephalitozoon hellem was detected in three patients. Microsporidia was significantly higher in patients with diarrhea than those without diarrhea (P=0.001). CD4 T cells blood count was significantly lower (<200 cells/µl blood) in HIV+ patients with Microsporidia (P=0.001). Also, there was significant difference between contact with animals with positive results of HIV+ and cancer patients (P< 0.005). This study confirmed that PCR technique was more sensitive than trichrome staining for diagnosis. Moreover, intestinal microsporidiosis caused diarrhea in HIV+ and cancer patients. This influenced treatment. Therefore, early diagnosis of microsporidiosis is effective on treatment strategies.