Drawing on the conservation of resources and social exchange theory, our research explores the mechanism of knowledge-sharing hostility through which despotic leadership relates to project performance with the buffering role of mindfulness. Time-lagged data were gathered from 311 employees and managers to mitigate the concern of method bias. The study’s results demonstrate that despotic leadership indirectly harms project performance by fostering knowledge-sharing hostility among team members. However, mindfulness serves as a valuable personal resource that mitigates this negative impact, enabling employees to better manage their reactions to the despotic behaviour exhibited by their leaders. This pioneering research offers empirical evidence regarding the effects of despotic leadership on project performance via the underlying mechanisms of knowledge-sharing hostility and mindfulness, addressing a gap in the literature and combining social exchange and conservation of resource theory