This paper investigates the substitution effect between corporate tax avoidance and debt, and examines its sensibility of three firm attributes including size, profitability and credit constraint, using a sample of Taiwan listed corporations in 2005-2015. We find that tax avoidance is significantly negatively associated with leverage measured by total debt, which is partially consistent with Graham and Tucker (2006), Rao and Yu (2013) as well as Huang and Wang (2015); while, tax avoidance is significantly positively associated with leverage measured by long-term debt, which is different from Rao and Yu (2013) and is consistent with Bradley et al. (1984) as well as Downs (1993). Furthermore, the relation between tax avoidance and leverage is significant and negative for large firms when leverage measured by total debt, and is significant and positive for smaller firms when leverage measured by long-term debt. In addition, the relation between tax avoidance and leverage is significant and negative for less profitable firms when leverage measured by total debt, and is significant and positive for the profitable firms when leverage measured by long-term debt. Lastly, the relation between tax avoidance and leverage is significant and negative for firms with less favorable prior credit ratings when leverage measured by total debt, and is significant and positive for firms without credit ratings when leverage measured by long-term debt.