Ant-decapitating flies (lat. Megaselia scalaris (Loew)) is a quarantine object in the Russian Federation and is included in the Single list of quarantine objects of the Eurasian Economic Union, approved by the of the Council of the Eurasian Economic Commission dated 30.11.2016 No. 158, because it is a vector of dangerous diseases that cause great economic damage. The range covers large areas of North America, Africa, southern Europe, Australia, Southeast Asia, as well as the European part of Russia, namely the Southern Federal District and the Republic of Crimea. The list of regulated products subject to research to identify M. scalaris (Loew) is very extensive, and accurate identification to species of the received samples by entomological method by morphological features of copulatory organs is very labor-intensive and not accurate. Therefore, methods of molecular diagnostics were developed for identification, namely, comparison of the studied nucleotide sequence with the reference one using NCBI database and determination of genetic distances. The studies were carried out on the basis of the Department of Molecular Research of the North-West Testing Laboratory of FGBU «ARRIAH». Six samples of the genus Megaselia were used in this work. At the first stage, DNA was isolated using DNA-Extran 2 kits. Then genetic markers were obtained by classical PCR with subsequent detection by electrophoresis using the T100 Thermal Cycler, sequenced on a 3500 Genetic Analyzer. Identification was performed by comparing the obtained sequence in BioEdit program using NCBI database and by calculating genetic distances using two-parameter Kimura model and Tajima-Nei model. The study revealed advantages and disadvantages of the presented methods of molecular identification.