Objectives Numerous people have died from coronavirus disease 2019 (COVID-19) infection. Identifying crucial predictive biomarkers of disease mortality is critical to support decision-making and logistic planning in healthcare systems. This study investigated the association between mortality and medical factors and prescription records in 2020 in Japan, where COVID-19 prevalence and mortality remain relatively low. Methods This retrospective cohort study analyzed anonymous administrative data from the Diagnosis Procedure Combination (DPC) database in Japan. Results A total of 22,795 patients were treated in DPC hospitals in 2020 in Japan, and of these, 5,980 patients over 50 years old were hospitalized, with 299 (5.0%) dying. There were 2,399 severe patients among 11,440 total hospitalized patients (all ages). The results of a logistic model analysis revealed that an older age, male sex, Parkinson's disease, cerebrovascular diseases, and chronic kidney diseases were risk factors for mortality. A machine learning analysis identified an older age, male sex (mortality), pneumonia, drugs for acid-related disorders, analgesics, anesthesia, upper respiratory tract disease, drugs for functional gastrointestinal disorders, drugs for obstructive airway diseases, topical products for joint and muscular pain, diabetes, lipid-modifying agents, calcium channel blockers, drugs for diabetes, and agents acting on the renin-angiotensin system as risk factors for a severe status. Conclusions This COVID-19 mortality risk tool is a well-calibrated and accurate model for predicting mortality risk among hospitalized patients with COVID-19 in Japan, which is characterized by a relatively low COVID-19 prevalence, aging society, and high population density. This COVID-19 mortality prediction model can assist in resource utilization and patient and caregiver education and be useful as a risk stratification instrument for future research trials.