In this study, we demonstrate the improvement of quality factors in InP nanobeam cavities using atomic layer deposition (ALD). By depositing a small amount of Al2O3 thin films on the cavities, we achieve up to 140% enhancement in quality factors. This advancement in cavity quality factors holds promise for optimizing InP nanobeam cavities when incorporating active materials like quantum dots and quantum wells, enabling widespread utilization across diverse photonic applications.