事情在即将成功时失败。《明・梁辰鱼・浣纱记・第八出》:“凶逆,不日就诛灭了,九仞为山,功亏一篑,料想不劳而集,事败垂成!”
英语 fail on the verge of success(abortive attempt)