The upper-rotating, sword-piercing strapping machine is an automated strapping device specifically designed for bricks/blocks. It cleverly combines top-rotating and sword-piercing technologies to efficiently and securely strap brick stacks. The machine head (strapping mechanism) can move up and down along a vertical track, flexibly adapting to different stacking heights. Simultaneously, a rod-shaped mechanism called a "sword" precisely passes through the space at the bottom of the pallet from one side of the machine, working in conjunction with the machine head to complete the wrapping of the strapping, achieving a crisscross pattern of strapping to the brick stack.