Covertly using heroin during methadone maintenance treatment (MMT) is very common among heroin-dependent patients, which has posed threats to the physical health of heroin-dependent patients and social safety. Covertly using heroin may be influenced by many factors, especially social capital. Therefore, we aimed to investigate the relationship between behaviors of covertly using heroin during MMT and social capital heroin-dependent patients in Sichuan Province, China. A cross-sectional study was conducted between October and November 2018, with a total of 581 heroin-dependent patients participating in the study. In addition to socio-demographic characteristics and heroin use related behaviors, the questionnaire also included the measures of social capital: social network (SN), social support (SP), community participation (CP) and social trust (ST). Multivariate logistic regression analyses were used to estimate the association between different measures of social capital and heroin use. The prevalence of covertly using heroin of heroin during MMT was 31.0% among our participants in the 6 months before the study. After adjusting for socio-demographic factors and heroin-use related variables, SN (OR = 0.85, 95% CI: 0.76–0.95), SP (OR = 0.89, 95% CI: 0.83–0.95), and ST (OR = 0.88, 95% CI: 0.81–0.95) were significantly associated with heroin use. Results suggest that social capital may have a protective effect on behavior of covertly using heroin during MMT, which should be consider in the interventions for heroin-dependent patients, in order to reduce the incidence of heroin use during MMT as well as improve the compliance of MMT.