The invention discloses a method for preparing a single-walled carbon nanotube and an all-carbon heterojunction by taking graphene as a catalyst, which comprises the following steps: step 1, processing a growth substrate: s1, ultrasonically cleaning a growth substrate in ultra-pure water, acetone, ethanol and ultra-pure water in sequence; s2, blowing the growth substrate by high-purity nitrogen to dry the growth substrate; and s3, putting the cleaned substrate into a muffle furnace, performing high-temperature annealing in air, heating to 900 DEG C within 2 hours, keeping the temperature at 900 DEG C for 8 hours, cooling to 300 DEG C within 10 hours, and naturally cooling; step 2, mechanically stripping graphene on the treated growth substrate, wherein the number of layers is 1-10; step 3, growing a carbon nanotube on the substrate deposited with the graphene, and introducing hydrogen and a carbon source into a chemical vapor deposition system to grow a single-walled carbon nanotube; and 4, making the all-carbon heterojunction provided by the invention into a field effect transistor device according to the following preparation process. The single-walled carbon nanotube does not contain metal in the preparation process, and can be used for preparing a field effect transistor device with stable performance.