Posttransplant cyclophosphamide (PTCy) graft-versus-host disease (GVHD) prophylaxis has enabled haploidentical (Haplo) transplantation to be performed with results similar to those after matched unrelated donor (MUD) transplantation with traditional prophylaxis. The relative value of transplantation with MUD vs Haplo donors when both groups receive PTCy/calcineurin inhibitor/mycophenolate GVHD prophylaxis is not known. We compared outcomes after 2036 Haplo and 284 MUD transplantations with PTCy GVHD prophylaxis for acute leukemia or myelodysplastic syndrome in adults from 2011 through 2018. Cox regression models were built to compare outcomes between donor types. Recipients of myeloablative and reduced-intensity regimens were analyzed separately. Among recipients of reduced-intensity regimens, 2-year graft failure (3% vs 11%), acute grades 2 to 4 GVHD (hazards ratio [HR], 0.70; P = .022), acute grades 3 and 4 GVHD (HR, 0.41; P = .016), and nonrelapse mortality (HR, 0.43; P = .0008) were lower after MUD than with Haplo donor transplantation. Consequently, disease-free (HR, 0.74; P = .008; 55% vs 41%) and overall (HR, 0.65; P = .001; 67% vs 54%) survival were higher with MUD than with Haplo transplants. Among recipients of myeloablative regimens, day-100 platelet recovery (95% vs 88%) was higher and grades 3 and 4 acute (HR, 0.39; P = .07) and chronic GVHD (HR, 0.66; P = .05) were lower after MUD than with Haplo donor transplantation. There were no differences in graft failure, relapse, nonrelapse mortality, and disease-free and overall survival between donor types with myeloablative conditioning regimens. These data extend and confirm the importance of donor-recipient HLA matching for allogeneic transplantation. A MUD is the preferred donor, especially for transplantations with reduced-intensity conditioning regimens.