作茧自缚

zuò jiǎn zì fù

to spin a cocoon around oneself (idiom); enmeshed in a trap of one's own devising

hoist by his own petard

作

zuò

to do; to engage in

茧

jiǎn

variant of 繭|茧[jian3]

自

zì

(bound form) self; oneself

缚

fù

to bind