The invention discloses an eight-shaft-moving chip repairing and attaching device and method with a visual positioning function. The device is provided with a first linear guide rail pair, a second linear guide rail pair, a third linear guide rail pair, a fourth linear guide rail pair, a fifth linear guide rail pair, a sixth linear guide rail pair, a seventh linear guide rail pair, an eighth linear guide rail pair, a tray assembly, a first heating assembly, a second blowing assembly, a third heating assembly, a first visual positioning assembly, a second visual positioning assembly and a chip taking and attaching assembly. Multi-dimensional motion trails are provided by the several linear guide rail pairs so that the tray assembly, the heating assemblies, the visual positioning assemblies and the chip taking and attaching assembly can be controlled by a controller to achieve positioning, heating, taking and placing flexibly, and therefore the sealing-off and chip attaching function can be achieved. Because the several linear guide rail pairs and the heating assemblies are arranged, a plurality of PCBs or chips can be operated at the same time, and accordingly the sealing-off and chip attaching efficiency can be greatly improved, and human cost can be greatly reduced as well.