High Q-factor is achieved in liquid by using an in-plane swing-mode micro-resonator that is specific-designed with a gas-liquid separated structure. Such a resonator can be used for long-term operation in solution for real-time bio-detection. With design of an anti-leakage narrow ‘hydrophobic-slit’ to protect the resonator still in air for high-Q vibration, while only the sensing-region of the device contacts the analyte solution. In addition, the in-plane vibrated resonator works in a swing-mode that helps to gain high-Q by largely decreasing liquid damping. Q=162 has been experimentally achieved in water for the resonator. With the polyclonal antibody (pAb) immobilized at the sensing-region, the sensor experimentally realizes liquid-phase real-time detection to E.coli DH5α in PBS solution.