The invention discloses a preparation method and applications of hollow gold nanospheres modified by CpG oligodeoxynucleotide. Cobalt chloride is subjected to reduction by adopting sodium borohydride,thus cobalt nanoparticles are obtained, cobalt nanoparticles are adopted for carrying out reduction on chloroauric acid, and thus hollow gold nanospheres are prepared; CpG oligodeoxynucleotide, a surfactant and a buffer solution are added into a solution of the hollow gold nanospheres, shaking culture is carried out, and thus the hollow gold nanosphere material modified by CpG oligodeoxynucleotide is obtained. According to the technical scheme, by utilizing the property that the hollow gold nanospheres have the large loading capacity, CpG is loaded through the self-assembly effect, the synthesis method is simple, and the method is suitable for large-scale production and application; the cell uptake capacity of CpG oligodeoxynucleotide can be enhanced, and the biocompatibility is good; thehollow gold nanospheres modified by CpG oligodeoxynucleotide have the near-infrared surface plasma adsorbing effect, the primary tumor is eliminated by utilizing the photothermal ablation effect, a tumor antigen is generated in situ, under the promoting of CpG oligodeoxynucleotide, the antitumor immunity of the whole body is induced, and the distant metastasis tumor is further treated.