Stomach pain and heartburn are caused by atrophic gastritis and gastric ulcer with heart-related diseases. Most stomach pains are caused by impaired stomach function, inflammation, congestion, and ulcerative surface of the gastric mucosa. If gastritis is not treated in time, some people will develop atrophic gastritis, which is accompanied by indigestion and stomach pain when the gastric mucosa is stimulated by gastric acid. Patients with gastric ulcer not only have impaired stomach function, but also cause severe pain when the ulcer surface is stimulated by excessive secretion of gastric acid. Some people not only have stomach diseases but also heart diseases, such as coronary heart disease, angina pectoris, and heart rate insufficiency, which can affect the heart function during the attack of stomach diseases, and therefore can be accompanied by heart panic. For people with stomach pain and heartburn, it is best to have an electrocardiogram in time to confirm the diagnosis and treat the disease as soon as possible.