A method for solid-phase synthesis of a DNA-encoded compound library, comprising: a. reacting controlled pore glass comprising an amine group as a solid carrier G-1 with a linker molecule L-1 in an organic solvent at 15-25°C for 12-16 h, separating and purifying to obtain L-G-1 wherein Fmoc is a amino-protecting group fluorenylmethoxycarbonyl; b. reacting a single-stranded DNA with a linker molecule L-0 in the presence of a condensing agent at 15-25°C for 12-16 h, separating and purifying to obtain L-2 wherein is the DNA; c. reacting the L-G-1 obtained in step (a) with the L-2 obtained in step (b) in an organic solvent at 20-45°C for 14-30 h, separating and purifying to obtain L-G-2 d. removing the Fmoc protecting group of the L-G-2 to obtain L-G-2-1 e. (i) reacting the L-G-2-1 obtained in step (d) with a skeleton molecule in an organic amine and an organic solvent and in the presence of a condensing agent at 25-30°C for 12-16 h, separating and purifyingto obtain L-G-2-2; wherein the skeleton molecule contains any one or more of groups consisting of hydroxyl group, amino group, carboxyl group, cyanate group and aldehyde group; and (ii) reacting the L-G-2-2 obtained in step (i) with R 1 in an organic solvent and in the presence of an organic amine and a condensing agent at 25-30°C for 12-16 h, separating and purifying to obtain L-G-2-2-1; and then performing DNA encoding on the L-G-2-2-1 to obtain L-G-3-1, comprising steps of: connecting a marker sequence with the DNA of the L-G-2-1-1 in series and specifically marking the R 1 with the marker sequence; wherein R 1 is a building block; f. removing the solid carrier from the L-G-3-1 obtained in step (e) to obtain DNA-encoded compound library L-D-T. a. reacting controlled pore glass comprising an amine group as a solid carrier G-1 with a linker molecule L-1 in an organic solvent at 15-25°C for 12-16 h, separating and purifying to obtain L-G-1 wherein Fmoc is a amino-protecting group fluorenylmethoxycarbonyl; b. reacting a single-stranded DNA with a linker molecule L-0 in the presence of a condensing agent at 15-25°C for 12-16 h, separating and purifying to obtain L-2 wherein is the DNA; c. reacting the L-G-1 obtained in step (a) with the L-2 obtained in step (b) in an organic solvent at 20-45°C for 14-30 h, separating and purifying to obtain L-G-2 d. removing the Fmoc protecting group of the L-G-2 to obtain L-G-2-1 e. (i) reacting the L-G-2-1 obtained in step (d) with a skeleton molecule in an organic amine and an organic solvent and in the presence of a condensing agent at 25-30°C for 12-16 h, separating and purifyingto obtain L-G-2-2; wherein the skeleton molecule contains any one or more of groups consisting of hydroxyl group, amino group, carboxyl group, cyanate group and aldehyde group; and (ii) reacting the L-G-2-2 obtained in step (i) with R 1 in an organic solvent and in the presence of an organic amine and a condensing agent at 25-30°C for 12-16 h, separating and purifying to obtain L-G-2-2-1; and then performing DNA encoding on the L-G-2-2-1 to obtain L-G-3-1, comprising steps of: connecting a marker sequence with the DNA of the L-G-2-1-1 in series and specifically marking the R 1 with the marker sequence; wherein R 1 is a building block; (i) reacting the L-G-2-1 obtained in step (d) with a skeleton molecule in an organic amine and an organic solvent and in the presence of a condensing agent at 25-30°C for 12-16 h, separating and purifyingto obtain L-G-2-2; wherein the skeleton molecule contains any one or more of groups consisting of hydroxyl group, amino group, carboxyl group, cyanate group and aldehyde group; and (ii) reacting the L-G-2-2 obtained in step (i) with R 1 in an organic solvent and in the presence of an organic amine and a condensing agent at 25-30°C for 12-16 h, separating and purifying to obtain L-G-2-2-1; and then performing DNA encoding on the L-G-2-2-1 to obtain L-G-3-1, comprising steps of: connecting a marker sequence with the DNA of the L-G-2-1-1 in series and specifically marking the R 1 with the marker sequence; f. removing the solid carrier from the L-G-3-1 obtained in step (e) to obtain DNA-encoded compound library L-D-T.