Perhaps from G1 (as a negative particle) and the base of G3313; properly to miss the mark (and so not share in the prize), that is, (figuratively) to err, especially (morally) to sin: - for your faults, offend, sin, trespass.
Meanings (from Abbott-Smith's lexicon)
1.to miss the mark (in Homer, Aeschylus and others), hence figuratively (in Homer and others), to err, do wrong.
While he answered for himself, Neither against the law of the Jews, neither against the temple, nor yet against Caesar, have I offended any thing at all.
ἥμαρτον.hēmartonhave I sinned.V-2AAI-1SG264
The highlighted words show how this word is translated in each verse. Some verses have no highlight, and a few highlights may not be exact.