The composite based on graphite-like carbon nitride and on yttrium ferrite doped by magnetic ions is a promising photocatalyst for energy consuming reactions such as decomposition of water into hydrogen. This system provides efficient charge separation and most productive light absorption. It is known that photocatalytic activity is affected by the bandgap, specific surface area, and crystallinity. Preparing composites based on graphite-like carbon nitride not only improves the above parameters but also creates additional properties, e.g. magnetic ones due to the doping by the Er3+ erbium magnetic ion. It is shown that the magnetization ability of the composite increases and its bandgap decreases from with 2.70 eV to 2.55 eV with increasing degree of ferrite substitution by the Er3+ magnetic ion, thus confirming the above hypotheses.