Does the security company need to go through the formalities of leaving the original company?

In the case of merger or division of the employer, the original labor contract is still valid, so if the employee wants to continue to work in the new company, he does not need to leave before joining.

According to the Labor Contract Law

Article 33 The change of the name, legal representative, principal responsible person or investor of the employing unit shall not affect the performance of the labor contract.

Article 34 Where an employing unit is merged or divided, the original labor contract shall remain valid, and the employing unit that inherits its rights and obligations shall continue to perform it.

Article 35 The employer and the employee may change the contents agreed in the labor contract through consultation. Changes to the labor contract shall be made in written form.

The revised text of the labor contract shall be held by the employer and the employee respectively.