What is heparin? Heparin is an anticoagulant (blood thinner) that prevents the formation of blood clots. Heparin is used to treat and prevent blood clots caused by certain medical conditions or medical procedures. Heparin is also used before surgery to reduce the risk of blood clots. Do not use heparin injection to flush (clean out) an intravenous (IV) catheter. A …