The gut microbiota serves a crucial role in the development of host immunity. Immunocompromised patients are particularly vulnerable to dysbiosis not only by virtue of a defect in the immune system but also due to increased susceptibility to infection and multiple courses of antibiotic therapy. Fecal microbiota transplantation is by far the most effective option for restoring gastrointestinal homeostasis. However, it is contraindicated in patients with significant primary and secondary immunodeficiencies. This article presents the case of a 59-year-old patient with common variable immunodeficiency, after splenectomy at age 39 for primary immune thrombocytopenia, who manifested diarrhea of up to 10 stools per day accompanied by secondary malnutrition and cachexia. The patient was admitted to the hospital on multiple occasions due to this condition, with stool PCR tests confirming a HHV-5 (Cytomegalovirus, CMV) infection. Following the administration of valganciclovir, the patient’s complaints diminished, although, upon cessation of the drug, the symptoms recurred. In addition, the patient had an intestinal infection with C. difficile etiology. Given that the patient’s therapeutic options had been exhausted, after obtaining informed consent from the patient and approval from the bioethics committee to conduct a medical experiment, treatment of diarrhea was undertaken by fecal microbiota transplantation with the certified preparation Mbiotix HBI from the Human Biome Institute. The patient underwent two transplants, with a one-week interval between them. The initial procedure was performed using the endoscopic method, while the subsequent was conducted using the capsule method. Following the administration of the applied treatment, the patient’s symptoms were successfully alleviated, and no adverse effects were observed. A microbiological analysis of the intestinal microbiota was conducted prior to and following transplantation via next-generation sequencing (NGS). No recurrence of symptoms was observed during the two-year follow-up period. To the best of our knowledge, this is the first fecal microbiota transplantation in an adult patient with primary and secondary immunodeficiency.