How much wage inequality in Brazil is caused by firing costs? To answer this question, I develop and estimate a general equilibrium search and matching model with heterogeneous layoff rates among firms. Using matched employer-employee data from Brazil, I estimate the model, and I find that it replicates the observed residual wage inequality in the data. I simulate a counterfactual removal of existing firing costs, and I find that residual wage inequality drops by 26% as measured by wage variance and by 4.4% as measured by the p95-p5 ratio among 25- to 55-year-old males working in the private sector with at most a high school degree. Worker welfare among this subgroup of households increases by almost 1% in response to the abolishment of firing costs.