This study investigates the treatment of liver cancer by the magnetic hyperthermia approach and nanoparticles including \({Fe}_{3}{O}_{4}\) core with gold, silver alloy shell, and \({MoS}_{2}\) coating. Optical properties of these nanoparticles within the tumor, including the extinction coefficient and surface plasmon peak (SPR) as a function of size, structure, different compositions, and thickness are also investigated using the effective medium theory. Moreover, the impact of temperature distribution was assessed through the analytical modeling of alternating current (AC) magnetic field. The results of this study demonstrated that nanoparticles with a compound of \(F{e}_{3}{O}_{4}-{Au}_{0.25}{Ag}_{0.75}@{MoS}_{2},\) a 3 nm thick cover of gold-silver alloy, and 3 layers of \({MoS}_{2}\) have the best coefficient of extinction and SPR in the biological window. The gold-silver alloy improved the extinction coefficient and, at the same time, prevented the accumulation of magnetic nanoparticles. Since the gold-silver alloy alone cannot function within the range of biological windows, \({MoS}_{2}\) was used, which increased the extinction efficiency at higher wavelengths. Examination of the temperature distribution in the tumor for the proposed alloy compound indicated that after a short time from the start of irradiation, the tumor temperature reaches 45 ° C. Also, the temperature distribution within the tumor tissue reached its maximum value at the center of the tumor and decreased dramatically as getting away from the center. The use of magnetic hyperthermia enabled localized delivery of therapeutic dose to malignant tumors; hence, exhibiting superior performance/efficiency over the photothermal method.