As Christians were persecuted at that time in China so he used to work as a vegetable vendor in the daytime and used to offer mass for the Christians at night. A local carpenter informed the authorities about Liu and his faith, so the authorities arrested him while he was offering mass on 15 August 1817. Authorities asked him to renounce his faith or pay a heavy bribe to get released from the jail but he didn't have that much money to pay and refused to renounce his faith. He was ordered to be executed. As per the order of the court he was strangled to death on 13 February 1818 at the Square of Execution at the East Gate of Chengdu, capital of the Sichuan province.