The invention discloses a method for preparing cage-shaped gold nanoparticles through a lanreotide acetate template. Mainly, according to the proportion that 0.5-1.0 mg of lanreotide acetate is added in each milliliter of a hydrochloric acid solution with the pH of 2-6, a lanreotide acetate solution is prepared and placed in a metal bath at the temperature of 70 DEG C for 20-40 min, and ultrasonic treatment is carried out; an auric chloride solution is added in the lanreotide acetate solution, the molar ratio of the auric chloride solution and the lanreotide acetate solution is 1:4-8, the mixture is placed in a water bath constant-temperature oscillator, the rotating speed is 100-150 rpm, and incubation at the temperature of 25-30 DEG C is conducted for 16-24 h; reducing agent sodium borohydride is added in the incubated solution, the molar ratio of the reducing agent sodium borohydride to the auric chloride solution is 1:2-4, the dripping speed is controlled at 2 drops / min, the reaction temperature is about 22-25 DEG C, the reaction time is 5-15 min, and the cage-shaped gold nanoparticles with the grain size of 80-120 nm and good dispersibility are obtained. The method has the advantages that raw materials are low in price and easy to obtain, the device is simple, operation is easy, the reaction conditions are moderate, the appearance is controllable, and repeatability is high.