Pellet injection is an attractive technology for core-fueling and magnetohydrodynamic study in magnetic-confinement fusion devices like tokamaks and stellarators. It can inject solid hydrogen/deuterium pellets into the plasma with deeper density deposition compared with other fueling methods, such as gas puffing. A three-barrel H2 pellet injection system was installed on the J-TEXT tokamak and experiments were carried out. The pellets are formed in three barrels cooled by a cryocooler and compressor system at around 9 K, and are 0.8 mm/1 mm diameter and 0.8 mm length. The pellet is launched by helium propellant gas and injected from the low-field side of the plasma. The normal range of pellet speed is 210–310 m s−1 for different propellant gas pressures. Due to the three-barrel structure, the number of injected pellets can be adjusted between one and three. Pellets can be launched sequentially with arbitrary time intervals, which enables flexible applications. The results of the experiments show that pellet fueling efficiency can reach 50%. The energy confinement time increased by about 7.5‒10 ms after pellet injection.