Irrational pharmacotherapy and increasing pharmacy costs remain major concerns in healthcare systems. Pharmacists are expected to employ diagnosis-related group (DRG) data to analyse inpatient pharmacy utilization. This project aimed to pilot an efficient pharmacist-led programme to analyse factors related to pharmacy expenses, evaluate the rational use of drugs in batch processing, and make further interventions based on DRG data. Patients from the OB25 (caesarean section without comorbidities or complications) DRG were selected in 2018, and the most relevant factors were identified through statistical analysis. Interventions were implemented by sending monthly reports on prescribing data and drug review results for the same DRGs to the department starting in 2019. Pre-post comparisons were conducted to demonstrate changes in pharmacy costs and appropriateness at a tertiary teaching hospital with 2,300 beds in China. A total of 1,110 patients were identified from the OB25 DRG data in 2018. Multivariate linear analysis indicated that the number of items prescribed and wards substantially influenced pharmacy expenditure. Drugs labelled as vital, essential, and non-essential revealed that 46.6% of total pharmacy costs were spent on non-essential drugs, whereas 38.7% were spent on vital drugs. The use of inappropriate pharmaceuticals and drug items was substantially reduced, and the average pharmacy cost after intervention was 336.7 RMB in 2020. The benefit-cost ratio of the programme was 9.86. Interventions based on DRG data are highly efficient and feasible for reducing inpatient pharmacy costs and non-essential drug use.