From Halopedia, the Halo wiki
Sword Hijacking is a trick that will allow a player to hijack enemies in vehicles from a slightly greater distance in a map and at a faster speed under normal circumstances. It requires perfect, faultless timing, and an Energy Sword. This trick only works in Halo 2.
The player should perform a Sword Cancel by holding down the "X" button while lunging toward an enemy vehicle. The player will automatically hijack the vehicle when near it. This is particularly useful for boarding enemy Scorpion Tanks, Type-26 Wraiths, Banshees, and Type-32 Ghosts. It is even more useful in multiplayer.