The use of traditional medicine is a global phenomenon, and the WHO advocated its appropriate integration into modern healthcare systems. However, there is a hot debate about the legitimacy of traditional medicine among the general public. Here, we investigated the debate in the Chinese digital context by analysing 1954 responses related to 100 questions about traditional Chinese medicine (TCM) treatment against COVID-19 on the Zhihu platform. Attitude function theory was applied to understand the reasons underlying public attitudes.Results showed that Zhihu users generally held a supportive attitude toward TCM. Their attitudes mainly came from their own experience and traditional media. The general users were more negative while medical professionals were more positive toward TCM. Ego defence (eg, derogating evidence sources) was used the most to support attitudes, followed by value expression (eg, believing in science). Supporters showed fewer expressions of faith (eg, the use of TCM is a kind of faith), politics (eg, supporting TCM is about politics) and science value (eg, TCM is a field of science), fewer ego defence, more patriotism and cultural confidence expressions (eg, TCM is a cultural pride) and more knowledge explanation (eg, TCM accelerates the metabolism of phlegm) than expected. Opposers showed fewer utilitarian and knowledge functions, fewer expressions of patriotism and more expressions of faith, politics and economics, but more ego defence functions than expected. Opposing posts were more likely to attract engagement than supporting and neutral posts. Posts that mentioned attitude functions generally attracted more engagement.Our findings indicate that TCM debate in modern China is not only relevant to medical science and health, but also rooted deeply in cultural ideology, politics and economics. The findings can provide global insights into the development of proactive policies and action plans that will help the integration of traditional medicine into modern healthcare systems.