(obsolete), late 14c., pigges-nie, an endearing form of address to a girl or woman, apparently from Middle English pigges eye, literally "pig's eye," from pig (n.1) + neyghe, a variant of eye (n.) with unetymological -n- from min eye, an eye, etc. (see N). But pig-eyed is "having small, dull eyes with heavy lids, appearing sunken." See OED for explanation of why pig's eye might have been felt as a compliment. In a pig's eye! as an adverse retort is recorded from 1872.
Hir shoes were laced on hir legges hye; She was a prymerole, a piggesnye, For any lord to leggen in his bedde. [Chaucer, "Miller's Tale"]