Pharmaceutical waste management is a significant concern that poses risks to human and environmental health. The ineffective management of expired and unused medications can harm individuals and communities. This study proposes a novel approach to address the issue of pharmaceutical waste management by developing a location-routing problem (LRP) model using mixed-integer linear programing (MILP) to optimize the collection and disposal of pharmaceutical waste. The proposed model aims to minimize transportation costs, construction of collection centers, disposal costs, and carbon dioxide emissions, making it a cost-effective and environmentally sustainable approach to managing pharmaceutical waste. Initially, the feasibility, validity, and efficiency of the proposed model are examined by solving the problem in the GAMS software using CPLEX solver for small-scale problems. Sensitivity analyses are conducted to ensure the accuracy, reliability, robustness, and usefulness of the mathematical model for decision-making. In view of the inherent computational complexity of the proposed model, which is classified as nondeterministic polynomial time-hard and poses considerable difficulties when exact solutions are sought for large-scale problems, the present study resorts to two metaheuristic algorithms, specifically particle swarm optimization (PSO) and genetic algorithm (GA), as a means minimizing the computational burden. The results indicate that GA outperforms PSO in terms of objective function and solution time, with an average improvement of approximately 1% and 20%, respectively. The proposed model and algorithms provide a comprehensive approach to addressing the critical issue of pharmaceutical waste management, benefiting the healthcare industry, and society as a whole.