From Word Wide Words:
It was first recorded in 1707 in a translation by John Stevens of the collected comedies of the Spanish playwright Quevedo: "You would have me teach my Grandame to suck Eggs".
The (much) ruder version of my youth was 'You can't teach your father to fuck'