The present invention discloses a method for preparation of a hybrid comprising magnetite nanoparticles and carbon nitride nanotubes, comprising: preparing carbon nitride nanotubes by plasma chemical vapor deposition (CVD); dissolving the prepared carbon nitride nanotubes in triethyleneglycol to form solution and adding Fe (acetylacetonate)3 to the solution to obtain a mixture; and heating and cooling the mixture to form a hybrid comprising magnetite nanoparticles and carbon nitride nanotubes, in which the carbon nitride nanotubes are doped with magnetite nanoparticles.