Coronavirus Disease 2019 (COVID-19) has emerged as a global pandemic since late 2019 and has affected all forms of human life and economic developments. Various techniques are used to collect the infected patients’ sample, which carries risks of transferring the infection to others. The current study proposes an AI-powered UAV-based sample collection procedure through self-collection kits delivery to the potential patients and bringing the samples back for testing. Using a hypothetical case study of Islamabad, Pakistan, various test cases are run where the UAVs paths are optimized using four key algorithms, greedy, intra-route, inter-route, and tabu, to save time and reduce carbon emissions associated with alternate transportation methods. Four cases with 30, 50, 100, and 500 patients are investigated for delivering the self-testing kits to the patients. The results show that the Tabu algorithm provides the best-optimized paths covering 31.85, 51.35, 85, and 349.15 km distance for different numbers of patients. In addition, the algorithms optimize the number of UAVs to be used in each case and address the studied cases patients with 5, 8, 14, and 71 UAVs, respectively. The current study provides the first step towards the practical handling of COVID-19 and other pandemics in developing countries, where the risks of spreading the infections can be minimized by reducing person-to-person contact. Furthermore, the reduced carbon footprints of these UAVs are an added advantage for developing countries that struggle to control such emissions. The proposed system is equally applicable to both developed and developing countries and can help reduce the spread of COVID-19 through minimizing the person-to-person contact, thus helping the transformation of healthcare to smart healthcare.