Tumor-associated macrophages (TAMs) are a major component of the cancer microenvironment. Modulation of TAMs is under intense investigation because they are thought to be nearly always of the M2 subtype, which supports tumor growth. Gastrointestinal stromal tumor (GIST) is the most common human sarcoma and typically results from an activating mutation in the KIT oncogene. Using a spontaneous mouse model of GIST and 57 freshly procured human GISTs, we discovered that TAMs displayed an M1-like phenotype and function at baseline. In both mice and humans, the KIT oncoprotein inhibitor imatinib polarized TAMs to become M2-like, a process which involved TAM interaction with apoptotic tumor cells leading to the induction of CCAAT/enhancer binding protein (C/EBP) transcription factors. In human GISTs that eventually developed resistance to imatinib, TAMs reverted to an M1-like phenotype and had a similar gene expression profile as TAMs from untreated human GISTs. Therefore, TAM polarization depends on tumor cell oncogene activity and has important implications for immunotherapeutic strategies in human cancers.