Can the company withdraw its employees' shares in advance? Is it legal?

Illegal.

There are legal risks and compliance problems in the company's advance payment of employees' withdrawal. According to the Company Law of People's Republic of China (PRC), shareholders shall make capital contribution in accordance with the agreement, and shall not violate their commitments or withdraw their capital contribution. If the invested enterprise is used to pay for other matters, such as employee's withdrawal, it involves false capital contribution or withdrawal of capital contribution.