If the creature is an illegal target when Sip of Hemlock tries to resolve, it won't resolve and none of its effects will occur. The creature's controller won't lose 2 life. However, if Sip of Hemlock resolves and the creature isn't destroyed (perhaps because it regenerated or had indestructible), the creature's controller will still lose 2 life.