The COVID-19 pandemic came with disruptions in every aspect of human existence, with all the sectors of the economies of the world affected greatly. In the health sector, the pandemic halted and reversed progress in health and subsequently shortened life expectancy, especially in developing and underdeveloped nations. On the other hand, machine learning and artificial intelligence contributed a great deal to the handling of the pandemic globally. Therefore, the current study aimed to assess the role played by artificial intelligence and machine learning in addressing the dangers posed by the COVID-19 pandemic, as well as extrapolate the lessons on the fourth industrial revolution and sustainable development goals. Using qualitative content analysis, the results indicated that artificial intelligence and machine learning played an important role in the response to the challenges posed by the COVID-19 pandemic. Artificial intelligence, machine learning, and various digital communication tools through telehealth performed meaningful roles in scaling customer communications, provided a platform for understanding how COVID-19 spreads, and sped up research and treatment of COVID-19, among other notable achievements. The lessons we draw from this is that, despite the disruptions and the rise in the number of unintended consequences of technology in the fourth industrial revolution, the role played by artificial intelligence and machine learning motivates us to conclude that governments must build trust in these technologies, to address health problems going forward, to ensure that the sustainable development goals related to good health and wellbeing are achieved.