In recent years, community gardens are becoming more and more popular in China. However, the role of these community gardens varies significantly: some community gardens serve as an effective means of promoting social capital, while others cause social contradictions and public doubts due to the lack of professional design and management. Therefore, this paper aims to learn and better understand what factors affect the formation of social capital in Chinese community gardens. It screened eleven design factors and seven social factors and made social capital scale through literature review and expert workshop. On this basis, this study selected 35 community gardens in China as sample spaces, and collected 1257 questionnaires about the perception for social capital of gardeners through survey. In the statistical analysis phase, factor analysis and regression analysis were applied to analyze the role and the relative importance of different factors and social capital. Results show that the integration with green infrastructure, accessibility, size, visual openness, planting form, proportion of unproductive landscape, agricultural infrastructure, and smart infrastructure have significant impacts on social capital level. Meanwhile, the types of stakeholders, management rules, supervision system, self-management team, and operational activities have similar impacts on social capital level. This study recommends that planners and designers should adjust the above related factors in community garden design, and local government is urged to integrate community gardens into urban plans and public policies.