Bacterial symbionts, such as Wolbachia species, can manipulate the sexual development and reproduction of their insect hosts. For example, Wolbachia infection induces male-specific death in the Asian corn borer Ostrinia furnacalis by targeting the host factor Masculinizer (Masc), an essential protein for masculinization and dosage compensation in lepidopteran insects. Here we identify a Wolbachia protein, designated Oscar, which interacts with Masc via its ankyrin repeats. Embryonic expression of Oscar inhibits Masc-induced masculinization and leads to male killing in two lepidopteran insects, O. furnacalis and the silkworm Bombyx mori. Our study identifies a mechanism by which Wolbachia induce male killing of host progeny.