Background. The war in Ukraine arises the urgent need to intensify hydrocarbon production on its own territory in order to maintain and develop the country's energy independence. The effectiveness, low cost and relevance of the involvement are demonstrated by magnetic methods of studies of the near surface geological section and the soil for the oil and gas prospecting. Methods. The methodology of magnetic studies for the hydrocarbon prospecting is based on the methods of studying the environmental magnetism and soil, precision magnetic survey of natural systems and authigenic models of changes in magnetic mineralogy under the influence of hydrocarbon fluid migration. Results. The crucial aim is to distinguish the sources of the formation of the magnetic minerals. In most cases, soils contain minerals of natural pedogenic origin, authigenic secondary magnetic minerals, and sometimes detrital fine-coarse magnetic phases. For Ukraine, magnetite, maghemite, hematite, and goethite are the most common magnetic minerals of soils of the pedogenic origin. At the same time, the experience of conducting magnetic mineralogical analyzes of soils in the territories of oil and gas deposits indicates the presence of iron sulfides. First of all, monoclinic pyrrhotite is identified. The soils also contain accompanying hexagonal pyrrhotite, pyrite, and greigite. The results of thermomagnetic analyzes and hysteresis loops of soil samples collected at the territories of hydrocarbon deposits are presented and their mineral composition is analyzed. Conclusions. The results of the study of the impact of hydrocarbon fluid migration (microseepage) on the change in the mineral composition of soils indicate significant informativeness and the perspective of introducing the method into the complex of geological exploration works at various stages. Authigenic changes of magnetic minerals in the near surface geological section and soil, as well as natural and anthropogenic accumulation of hydrocarbon products in soils, cause changes in magnetic properties and form magnetic field anomalies.