Long-distance collimation of fast electron beams generated by laser-metallic-wire targets has been observed in recent experiments, while the mechanism behind this phenomenon remains unclear. In this work, we investigate in detail the laser-wire interaction processes with a simplified model and Classical Trajectory Monte Carlo simulations, and demonstrate the significance of the self magnetic fields of the beams in the long-distance collimation. Good agreements of simulated image plate patterns with various experiments and detailed analysis of electron trajectories show that the self magnetic fields provide restoring force that is critical for the beam collimation. By studying the wire-length dependence of beam divergence in certain experiments, we clarify that the role of the metallic wire is to balance the space-charge effect and thus maintain the collimation.