The present invention relates to the field of organic synthesis, and provides an organosilicon betaine type antimicrobial compound having a general formula I and preparation thereof:the antimicrobial compound provided by the present invention has a reactive functional group—siloxane, which can be subjected to chemical bonding with many material interfaces, thereby endowing a material or article surface treated with the antimicrobial compound I persistent antimicrobial activity. Also, the preparation of the compound has a simple process and easily controlled conditions, and is easy to be industrialized, which facilitates its wide applications.