Legionella pneumophila, the causative bacterium for Legionnaires' disease, hijacks host membrane trafficking for the maturation of the Legionella-containing vacuole (LCV). The LCV membrane mainly contains PtdIns4P, which is important for anchoring many secreted Legionella effectors onto the LCV. Here, we identify a cryptic functional domain (LepB_NTD) preceding the well-characterized RabGAP domain in the Legionella Dot/Icm type IV secretion system effector LepB. LepB_NTD alone is toxic to yeast and can disrupt the Golgi in mammalian cells. The crystal structure reveals an unexpected kinase fold and catalytic motif important for LepB_NTD function in eukaryotes. Cell biology-guided biochemical analyses uncovered a lipid kinase activity in LepB_NTD that specifically converts PtdIns3P into PtdIns(3,4)P2. PtdIns(3,4)P2 is efficiently hydrolysed into PtdIns4P by another Dot/Icm effector SidF that is known to possess phosphoinositide phosphatase activity. Consistently, SidF is capable of counteracting the cellular functions of LepB_NTD. Genetic analyses show a requirement for LepB kinase activity as well as lipid phosphatase activity of SidF for PtdIns4P biosynthesis on the LCV membrane. Our study identifies an unprecedented phosphatidylinositide 4-kinase activity from bacteria and highlights a sophisticated manipulation of host phosphoinositide metabolism by a bacterial pathogen.