This study examined the impact of workplace ostracism on employees’ knowledge hiding behavior. Based on the conservation of resource theory, this study seeks to identify the effects of job tension as a mediator and the moderating effect of employee loyalty. Using a time-lagged research design, we collected the data from 392 employees of the textile industry. Results indicate that workplace ostracism positively influences the knowledge hiding behavior such as evasive hiding and playing dumb, whereas it is not significantly related with rationalized hiding. More specifically, workplace ostracism increases the feeling of job tension, while job tension mediates the relationship between workplace ostracism and knowledge hiding. In addition, we found that workplace ostracism demolished the benefits of employee loyalty, as high workplace ostracism more strongly influences the feeling of job tension. We also discussed the theoretical and practical implications.