Background: Chronic obstructive pulmonary disease (COPD) and heart failure (HF) are risk factors for venous thromboembolism (VTE). Enoxaparin and unfractionated heparin (UFH) help prevent hospital-associated VTE, but few studies have compared them in COPD or HF. Objectives: To compare effectiveness, safety, and costs of enoxaparin vs UFH thromboprophylaxis in medical inpatients with COPD or HF. Methods: This retrospective cohort study included adults with COPD or HF from the Premier PINC AI Healthcare Database. Included patients received prophylactic-dose enoxaparin or UFH during a >6-day index hospitalization (the first visit/admission that met selection criteria during the study period) between January 1, 2010, and September 30, 2016. Multivariable regression models assessed independent associations between exposures and outcomes. Hospital costs were adjusted to 2017 US dollars. Patients were followed 90 days postdischarge (readmission period). Results: In the COPD cohort, 114 174 (69%) patients received enoxaparin and 51 011 (31%) received UFH. Among patients with COPD, enoxaparin recipients had 21%, 37%, and 10% lower odds of VTE, major bleeding, and in-hospital mortality during index admission, and 17% and 50% lower odds of major bleeding and heparin-induced thrombocytopenia (HIT) during the readmission period, compared with UFH recipients (all P <.006). In the HF cohort, 58 488 (58%) patients received enoxaparin and 42 726 (42%) received UFH. Enoxaparin recipients had 24% and 10% lower odds of major bleeding and in-hospital mortality during index admission, and 13%, 11%, and 51% lower odds of VTE, major bleeding, and HIT during readmission (all P <.04) compared with UFH recipients. Enoxaparin recipients also had significantly lower total hospital costs during index admission (mean reduction per patient: COPD, $1280; HF, $2677) and readmission (COPD, $379; HF, $1024). Among inpatients with COPD or HF, thromboprophylaxis with enoxaparin vs UFH was associated with significantly lower odds of bleeding, mortality, and HIT, and with lower hospital costs. Conclusions: This study suggests that thromboprophylaxis with enoxaparin is associated with better outcomes and lower costs among medical inpatients with COPD or HF based on real-world evidence. Our findings underscore the importance of assessing clinical outcomes and side effects when evaluating cost-effectiveness.