PurposeThis study aims to investigate the impact of organizational mistreatments, such as workplace bullying and ostracism, on task performance. Additionally, it explores the mediating role of cyber loafing and the moderating role of negative reciprocity beliefs.Design/methodology/approachAdopting a positivism research philosophy and a deductive approach, this study focuses on the petroleum sector-related organizations where enterprise resource planning requires active Internet use, potentially leading to cyber loafing. Data were collected from employees using purposive sampling techniques, resulting in a sample size of 248. The data analysis was conducted using AMOS and SPSS software.FindingsThe results indicate that cyber loafing fully mediates the relationship between workplace bullying and ostracism on task performance. Additionally, negative reciprocity beliefs significantly moderate the relationship between workplace bullying, ostracism and cyber loafing.Originality/valueThis study presents a moderated-mediation model of organizational mistreatments and task performance, elucidating the mechanisms through the mediating role of cyber loafing and the moderating role of negative reciprocity beliefs.