To act badly toward the person who is helping or has helped you.
Used about 600 b.c. by the Greek poet Sappho, this metaphor of a dog biting its master was first recorded in English in 1711.