Gold nanoparticles (AuNPs) have been established to sufficiently eradicate tumors by means of heat production for photothermal therapy. However, the translation of the AuNPs from bench to the clinic still remains to be solved until realizing high bioclearance after treatment. Herein, we developed a simple strategy for simultaneous formation and assembly of small-size gold nanoparticles (Au-SNPs) to form a novel nanocomposite in the presence of gum arabic (GA) by synchrotron X-ray irradiation in an aqueous solution within 5 min. GA, a porous polysaccharide, can not only provide a confined space in which to produce uniform Au-SNPs (1.6 ± 0.7 nm in diameter), but can also facilitate the formation of Au-SNPs@GA (diameter ≈ 40 nm) after irradiating synchrotron X-rays. Specifically, the Au-SNPs@GA possesses high thermal stability and a strong photothermal effect for killing cancer cells. Importantly, a bioclearance study demonstrated that the Au-SNPs@GA can be gradually excreted by the renal and hepatobiliary system, which might be due to the breakdown and oxidation of GA under irradiating synchrotron X-rays. Thus, the novel gold nanocomposite can be promising photothermal agents for cancer treatment at the therapeutic level, minimizing toxicity concerns regarding long-term accumulation in vivo.