The learned monks of the Middle Ages, and perhaps the less learned scribes who copied their writings, were just as likely to find errors in the things they wrote as we of today find in our own.
But they had no erasers, and parchment was too precious to risk the removal of ink with a knife, so they merely crossed out the matter in which an error had occurred by drawing lines obliquely across it.
To the monks such criss cross lines looked like lattices, so they called them cancelli, the Latin word for lattices.
This gave rise to the French verb canceler, modified into the English cancel.