A shattered pellet injector (SPI) based on in situ technology was developed in the HL-2A tokamak. In this paper, the basic principle of pellet formation is introduced, the mechanism of a SPI is described in detail, and test results are presented. Bench test experimental results show that reliable formation and acceleration of a large nitrogen pellet (diameter of ∼3.5 × 4 mm) were obtained. A double-impact tube was developed and tested for effective and reliable shattering of the pellet.