Background: China has the highest global prevalence of cigarette smokers, accounting for more than 40% of the total cigarette consumption in the world. Considering the shortage of smoking cessation services in China, and the acceptability, feasibility, and efficacy of mobile-phone-based text messaging interventions for quitting smoking in other countries, we conducted a mobile-phone-based smoking cessation study in China. Methods and findings: We conducted a randomized controlled trial in China across 30 cities and provinces from August 17, 2016, to May 27, 2017. Adult smokers aged 18 years and older with the intention to quit smoking were recruited and randomized to a 12-week high-frequency messaging (HFM) or low-frequency messaging (LFM) intervention (“Happy Quit”) or to a control group in a 5:2:3 ratio. The control group received only text messages unrelated to quitting. The primary outcome was biochemically verified continuous smoking abstinence at 24 weeks. Secondary outcomes included (1) self-reported 7-day point prevalence of abstinence (i.e., not even a puff of smoke, for the last 7 days) at 1, 4, 8, 12, 16, 20, and 24 weeks; (2) self-reported continuous abstinence at 4, 12, and 24 weeks; and (3) self-reported average number of cigarettes smoked per day. A total of 1,369 participants received 12 weeks of intervention or control text messages with continued follow-up for 12 weeks. The baseline characteristics of participants among the HFM (n = 674), LFM (n = 284), and control (n = 411) groups were similar. The study sample included 1,295 (94.6%) men; participants had a mean age of 38.1 (SD 9.79) years and smoked an average of 20.1 (SD 9.19) cigarettes per day. We included the participants in an intention-to-treat analysis. Biochemically verified continuous smoking abstinence at 24 weeks occurred in 44/674 participants in the HFM group (6.5%), 17/284 participants in the LFM group (6.0%), and 8/411 participants (1.9%) in the control group; participants in both the HFM (odds ratio [OR] = 3.51, 95% CI 1.64–7.55, p < 0.001) and the LFM (OR = 3.21, 95% CI 1.36–7.54], p = 0.002) intervention groups were more likely to quit smoking than those in the control group. However, there was no difference in quit rate between the HFM and LFM interventions. We also found that the 7-day point quit rate from week 1 to week 24 ranged from approximately 10% to more than 26% with the intervention and from less than 4% to nearly 12% without the intervention. Those who continued as smokers in the HFM group smoked 1 to 3 fewer cigarettes per day than those in the LFM group over the 24 weeks of trial. Among study limitations, the participants were able to use other smoking cessation services (although very few participants reported using them), cotinine tests can only detect smoking status for a few days, and the proportion of quitters was small. Conclusions: Our findings demonstrate that a mobile-phone-based text messaging intervention (Happy Quit), with either high- or low-frequency messaging, led to smoking cessation in the present study, albeit in a low proportion of smokers, and can therefore be considered for use in large-scale intervention efforts in China. Mobile-phone-based interventions could be paired with other smoking cessation services for treatment-seeking smokers in China. Trial registration: ClinicalTrials.gov NCT02693626.