The invention relates to a traditional Chinese medicine formula, in particular to a traditional Chinese medicine formula for treating heart qi deficiency and aims to solve the technical problems that the existing medicine for treating the heart qi deficiency has a great side effect, cures the symptoms not the disease, is not scientific in compatibility and is bad in treatment effect. The traditional Chinese medicine formula for treating the heart qi deficiency comprises the following raw materials in parts by weight: 8-12 parts of white ginseng, 8-12 parts of cassia twig, 13-17 parts of mongolian snakegourd, 13-17 parts of allium macrostemon, 8-12 parts of rhizoma pinelliae preparata, 13-17 parts of root of common peony, 13-17 parts of radix ophiopogonis and 3-7 parts of coptis chinensis. The traditional Chinese medicine formula for treating the heart qi deficiency, disclosed by the invention, can effectively improve the cardiac function of a model rat suffering from the heart qi deficiency, promotes recovery of scathing cardiac muscle tissues, adjusts biochemical criterion, and has an excellent treatment effect on the model rat suffering from the heart qi deficiency; as proved by clinical trial, the traditional Chinese medicine formula has a total effective rate of more than 90% in treating the heart qi deficiency, is free from toxic and side effects, and is used in the field of treating heart qi deficiency syndrome.