前功尽弃

qián gōng jìn qì

to waste all one's previous efforts (idiom)

all that has been achieved goes down the drain

前

qián

front

功

gōng

meritorious deed or service

尽

jìn

to use up

弃

qì

to abandon