Endocarditis is a life-threatening inflammation of the inner lining of the heart's chambers and valves. This lining is called the endocardium. Endocarditis is usually caused by an infection. Bacteria, fungi or other germs get into the bloodstream and attach to damaged areas in the heart. Things that make you more likely to get endocarditis are artificial heart valves, damaged heart valves or other heart defects.