I have my doubts about it being a prefix or lexical component, as I only remember it in nequicia; but it would be of Latin origin like nequam, ne qui (ne cuí "not que" or "not who" [does something]), which translates as "useless", and consequently , "bad".