The earliest known record of this
proverb in literature can be found in
William Camden's
Remains Concerning Britain (1605):
An ynche in a misse is as good as an ell.
A 1655 quote from Thomas Fuller illustrates the lengthy syntax of the proverb's original structure:
An hairs breadth fixed by a divine finger, shall prove as effectuall a separation from danger as a miles distance.
By the late 18th Century the proverb had been abridged to its current form.
Contrast Half a loaf is better than none.