The invention discloses a workpiece clamping structure for a grinding tool, and a tracking type casting edging machine and method. The workpiece clamping structure comprises a workbench, the workbench is provided with a plurality of positioning devices, at least one positioning device comprises a cylinder and a clamping block, and the clamping blocks clamp or leave a workpiece to be machined, under the action of cylinder piston rods. The tracking type casting edging machine comprises a bed, a moving mechanism, a grinding head assembly, the above-mentioned workpiece clamping structure, an industrial camera, a visual recognition system and a control system. The edging machine can quickly grind flash and burrs on a casting according to the requirements of a production drawing and the shape and size of the casting, without programming and equipment adjusting during casting replacement, the production efficiency is high, and machining error is small.