PurposeThis paper aims to investigate whether and how enterprise social media (ESM) affordances affect employee agility.Design/methodology/approachAdopting self-determination theory (SDT), this study examines a model in which the four ESM affordances (i.e. visibility, association, editability and persistence) impact employee agility through the three basic psychological needs satisfaction (i.e. perceived autonomy, perceived relatedness and perceived competence) of employees. Mplus 7.4 was used to analyze survey data gathered from 304 employees who used ESM in the workplace.FindingsThe authors’ findings show that all four ESM affordances contribute to perceived relatedness and perceived competence; visibility and association affordances also have positive impacts on perceived autonomy; and all three psychological needs satisfaction positively impact employee agility.Originality/valueFirst, this study adapted SDT to explore how ESM influences employee agility. Second, this study enriches the relevant research on the antecedents of employee agility and also provides new evidence and theoretical support for employee agility. Third, this study effectively expands the antecedents and outcomes of employee basic psychological needs satisfaction in the domain of ESM and agility.