The peculiarities of the exchange interaction between the carrier spin and localized spin moments of magnetic ions in the close vicinity of semimetal-semiconductor transition have been studied on the example of semimagnetic quaternary solid solution Hg 1-x-y Cd x Mn y Se (x = 0.10, y = 0.02, E g = 45 meV) by means of Shubnikov-de Haas oscillations. It is shown that due to the s-p hybridization of electron wavefunctions the exchange constant α turns out in a complicated function α of energy gap E g and electron concentration which changes from positive α N 0 = 0.15 eV to negativẽ αN 0 =-0.28 eV values which are typically accepted for wide gap semimagnetic semiconductors.