This phrase often refers to someone who is a rude, obnoxious or has done something horrible to a person or many people. This is calling them work which we often do not like doing and calling them nasty at the same time, therefore a nasty peice of something we hate.
"That teenager has beaten up so many people for no good reason, gosh he is a NASTY PEICE OF WORK!"

This phrase is often used in first person, for e.g Is a nasty peice of work, not often Was a nasty peice of work.
by Ryasscrack February 12, 2019
Get the Nasty Peice of work mug.