wán huǒ zì fén

玩火自焚

one who plays with fire will get burned

to play with fire and get burned; to play with evil and suffer the consequences; to get one’s finger burnt; who sows the wind shall reap the whirlwind