Aberrant production of proinflammatory cytokines is linked to many autoimmune diseases, and their inhibition by small molecule compounds is considered beneficial. Here, we performed phenotypic screening in IFNγ/LPS-activated RAW264.7, mouse macrophage cells, and discovered AS2677131 and AS2795440 as novel and potent inhibitors of IL-12p40, a subunit of IL-23. Interestingly, these compounds exhibited unique pharmacological activities in their inhibition of the production of IL-12p40, IL-6 and IL-1β but not TNFα in activated macrophages or dendritic cells, and expression of IgM-induced MHC class II on B cells. To reveal these mechanisms, we synthesized two different activity probes which were structurally related to the AS compounds, and identified probe-specific binding proteins, including PIKfyve, a Class III PI kinase. The AS compounds inhibited PIKfyve activity and mimicked the properties of PIKfyve-deficient cells, eventually validating PIKfyve as target molecule. Regarding mechanism, AS2677131 regulated DNA binding activity of c-Rel on IL-12p40 and IL-1β promoter. As expected, a PIKfyve inhibitor prevented the development of arthritis in rats. Taken together, our findings of the novel and potent PIKfyve inhibitors AS2677131 and AS2795440 reveal the critical role of PIKfyve in proinflammatory cytokine production and B cell activation, and may indicate a potential new therapeutic option for treatment of inflammatory diseases.