Possibly from the days when one sailor aboard ship was employed to swing and throw a lead-weighted rope knotted in fathoms into the water in order to determine its depth. Presumably that was an easier task than scrambling about on the rigging etc and hence it took on the meaning of skive, shirk or malinger.
Albert Jack, in his book Red Herrings and White Elephants on phrase origins, has this to say about the leadsman's work..."As the easiest job on board it was usually given to the sick or injured and many feigned illness in an attempt to secure such light work."
However, there are some who claim that it was actually a very hard job, constantly hauling up, swinging and throwing a heavy weight. Consequently, the sailor concerned would try to get away with a lot of swinging and not too much hauling and throwing when he could get away with it! In other words that he would skive. This seems improbable, given that the procedure would only take place in very shallow waters where there was a danger of the ship's striking bottom. In these very circumstances, an officer would almost certainly have been posted nearby so the chances of skimping the task would be almost nil.
A third point worth considering is that other people believe the phrase did not come from a nautical procedure at all and that it originated in the army.