This study attempts to examine the impact of electronic human resource management (E-HRM) systems on achieving a sustainable competitive advantage (SCA) in the tourism and hospitality industry by incorporating sustainable innovation (SI) and organizational agility (OA) as mediators. To survive, tourist and hospitality organizations must embrace digital transformation by using E-HRM practices such as digital recruiting, online training, and performance management tools. Organizations may improve their HR departments’ efficiency, effectiveness, and decision making, enhancing the overall organizational performance and preserving a sustainable competitive edge. Middle and first-line management of the five-star hotels and travel agencies in category A operating in Egypt were investigated. A PLS-SEM analysis was performed on 313 valid responses, gathered using WarpPLS 7.0. The findings revealed that E-HRM is positively associated with SCA, SI, and OA. Furthermore, there were positive associations between SI and OA and SCA. SI and OA were also shown to be mediators in the relationship between E-HRM and SCA. The study adds to the existing literature on how E-HRM impacts SI, OA, and SCA. The relationship between these components in hotels and travel agencies has not been the subject of any empirical research. The current study has addressed gaps by empirically analyzing these relationships in the context of Egyptian hotels and travel agencies. It integrates E-HRM, innovation, organizational agility, and competitive advantage within the context of sustainability in tourism and hospitality.