Sustainable supply chain management encompasses the strategic coordination and control of material, information, and financial flows, as well as the collaborative efforts among the entities engaged in the medicinal supply chain. This research proposes a dynamic and sustainable supply chain management model tailored explicitly for the inpatient pharmacies of Medical Centers and Hospitals affiliated with Iran University of Medical Sciences. This is a quantitative study in terms of research objective and a qualitative study based on the stages in the conceptual development of the model. Therefore, the current study can be considered a mixed-methods approach. After identifying the key factors influencing the sustainability of the medicine supply chain, we conducted a dynamic analysis of the problem using system dynamics methodology. In order to simulate the system's behavior over 24 months, we utilized a combination of existing documentary information and expert opinions. The developed model was implemented using Vensim PLE software, allowing us to simulate and analyze the impact of various policies on the system. Medicine disposal exhibited an upward trend, particularly during the second 12-month period. Conversely, the trend of medicine expirations remained relatively stable in the initial months but showed an upward trajectory after that. The cost associated with disposed medicine experienced a consistent increase, with a higher rate observed during the second 12-month period. In contrast, sales of low-consumable medicine experienced a significant initial surge followed by a slower growth rate. Finally, the pharmacy's profit demonstrated an overall increasing trend, although the rate of increase was higher during the first 12 months. Among the various scenarios considered, namely "increasing the adequacy of human resources," "increasing the speed of response," and "utilizing pharmacists in the drug prescribing team," it was found that these interventions had a substantial effect on both enhancing the pharmacy's profit and reducing medication waste. Therefore, these scenarios were identified as having the most significant impact. The proposed model can serve as a valuable tool for forecasting and informing policy-making, providing insights into addressing the challenges associated with the sustainable drug supply chain in hospital pharmacies.