The differential diagnosis of neoplasms of various localizations is the primary task in clinical practice of all physicians. We present a description of the case of invasion with Dirofilaria repens in the lung of a 68-year-old patient. In 2016 the patient was diagnosed with cancer of the left kidney and underwent a left-sided nephrectomy. During the dynamic observation in 2019, a lump was found in the left lung, which was regarded as a metastasis. An atypical SIX resection of the left lung was performed. Microscopy of the removed lump revealed the presence of a nematode of the genus Dirofilaria, presumably D. repens. The species identity of D. repens was confirmed by polymerase chain reaction using species-specific primers. It is known that the morphological identification of parasites up to the species in the surgical material presents certain difficulties and requires high professional training of the researcher. Therefore, the diagnosis of dirofilariasis in atypical localizations of nematodes in the human body is of great importance in the differentiation of malignant and benign formations, and the use of the polymerase chain reaction method can significantly increase the accuracy in establishing the final diagnosis.