This study delves into the potential impact of machine learning (ML) on supply chain optimization and inventory management for e-commerce. Our primary focus is analyzing the accuracy of demand forecasting, optimizing inventory levels, and evaluating the impact of real-time decision-making on supply chain efficiency. Using a secondary data-based review methodology, this study explores the implementation of advanced predictive analytics, real-time data processing, autonomous operations, and personalized customer experiences in prominent e-commerce companies like Amazon, Walmart, and Alibaba. Our findings show impressive advancements in demand forecasting accuracy, dynamic inventory management, and operational responsiveness. These improvements have led to cost savings and increased customer satisfaction. Nevertheless, some drawbacks exist, such as the significant expenses associated with implementation, concerns about data privacy, and the potential for overfitting the model. Policy implications call for solid data protection regulations, financial assistance for smaller businesses, and ethical guidelines for AI to promote fair and responsible machine learning applications. By tackling these obstacles, companies can maximize the potential of ML technologies to enhance efficiency, promote sustainability, and gain a competitive edge in the ever-changing world of e-commerce.