Tyrosine kinase 2 (TYK2) has a pivotal role in immunity to infection and tumor surveillance. It is associated with several cytokine receptor chains including type I interferon (IFN) receptor 1 (IFNAR1), interleukin- (IL-) 12 receptor beta 1 (IL-12Rb1) and IL-10R2. We have generated a mouse with a conditional Tyk2 null allele and proved integrity of the conditional Tyk2 locus. TYK2 was successfully removed by the use of ubiquitous and tissue-specific Cre-expressing mouse strains. Myeloid TYK2 was found to critically contribute to the defense against murine cytomegalovirus. Ubiquitous TYK2 ablation severely impaired tumor immunosurveillance, while deletion in myeloid, dendritic or T cells alone showed no effect. The conditional Tyk2 mouse strain will be instrumental to further dissect TYK2 functions in infection, inflammation and cancer.