What is a heart infection? A heart infection is a serious infection that can lead to heart damage and life-threatening complications. Bacteria, viruses and, rarely, fungi can cause a heart infection. Other names for this condition include cardiac infection and heart valve infection. Your heart has three main layers, any of which can be the site of a heart infection. The types of heart infection include: Endocarditis is an infection or inflammation of the endocardium. This is the inner most layer of the heart. The endocardium lines the inside of the four heart chambers and the four heart valves. Endocarditis is the most common type of heart infection. It most often occurs in people with pre-existing valve disease and other heart problems. Treatment usually requires hospitalization. Myocarditis is an infection or inflammation of the myocardium. This is the middle muscular layer of the heart. Viral infections are one of several causes of myocarditis. This type of heart infection is rare. Pericarditis is an infection or inflammation of the pericardium. This is the outer layer or membrane covering the heart. A viral infection is the most common cause. It occurs most often in men age 20 to 50 years from a viral infection. Typically, people recover with rest and treatment of symptoms. General symptoms of a heart infection include chest pain, fever, and shortness of breath. These symptoms can also be present with a life-threatening condition, such as heart attack. Seek immediate medical care if you, or someone you are with, have these symptoms.