Background Coronary heart disease is rapidly increasing in developing countries, but access to cardiac rehabilitation and secondary prevention remains low. In this study, we aimed to assess the effectiveness of a smartphone-based cardiac rehabilitation and secondary prevention programme delivered via the social media platform WeChat (SMART-CR/SP). Methods In this parallel-group, single-blind, randomised controlled trial, we recruited patients aged 18 years or older with coronary heart disease who had received percutaneous coronary interventions from a large tertiary hospital in Shanghai, China. Participants were randomly assigned (1:1) by block randomisation to either a 2-month intensive programme followed by a 4-month step-down phase of SMART-CR/SP or to usual care. In the SMART-CR/SP group, participants received comprehensive cardiac rehabilitation and secondary prevention via WeChat. The usual care group received standard outpatient cardiology follow-up but without formal cardiac rehabilitation and secondary prevention. Assessments were done at baseline, 2 months, 6 months, and 12 months. The primary outcome was change in functional capacity from baseline, measured by 6-min walk distance, at 2 months and 6 months. Analysis was by intention to treat. Research personnel involved in assessments were blinded to group allocation. Adverse-event analysis was based on percentage of patients who discontinued the study owing to adverse events. SMART-CR/SP programme-related safety issues were also recorded. This study was registered with the Chinese Clinical Trial Registry, number ChiCTR-INR-16009598.