The type I interferon (IFN) system plays an important role in controlling herpesvirus infections, but it is unclear which IFN-mediated effectors interfere with herpesvirus replication. Here we report that human myxovirus resistance protein B (MxB, also designated Mx2) is a potent human herpesvirus restriction factor in the context of IFN. We demonstrate that ectopic MxB expression restricts a range of herpesviruses from the Alphaherpesvirinae and Gammaherpesvirinae, including herpes simplex virus 1 and 2 (HSV-1 and HSV-2), and Kaposi's sarcoma-associated herpesvirus (KSHV). MxB restriction of HSV-1 and HSV-2 requires GTPase function, in contrast to restriction of lentiviruses. MxB inhibits the delivery of incoming HSV-1 DNA to the nucleus and the appearance of empty capsids, but not the capsid delivery to the cytoplasm or tegument dissociation from the capsid. Our study identifies MxB as a potent pan-herpesvirus restriction factor which blocks the uncoating of viral DNA from the incoming viral capsid.