Vomiting blood in liver cancer is mostly caused by upper gastrointestinal bleeding, and its causes include the following aspects: 1) rupture of esophagogastric fundic varices; 2) some patients have peptic ulcers on the basis of cirrhosis or liver cancer, and the ulcers cause bleeding; 3) mucosal damage or mucosal erosion caused by coagulation dysfunction, resulting in bleeding. If patients with hepatocellular carcinoma vomit blood, they are usually treated as upper gastrointestinal bleeding first. If the amount of bleeding is large and the degree of vomiting is also heavy, nowadays, clinical examination and treatment are usually performed under endoscopy because the bleeding site can be visually detected under endoscopy, and hemostatic treatment can also be performed by injecting tissue gel and sclerosing agent.