Endocarditis is an inflammation of the inner lining of the heart chambers and valves. It is usually caused by a bacterial infection entering the bloodstream and attaching to damaged heart valves or tissue. Without treatment, endocarditis can severely damage or destroy the heart valves. Treatment involves intravenous antibiotics for several weeks to kill the infection as well as possible surgery to repair or replace damaged heart valves.