The present invention provides methods and compositions for the generation of microglial progenitor cells and microglial cells from pluripotent stem cells, such as embryonic stem cells and induced pluripotent stem cells. The present invention also provides cells produced using such methods, and both methods of treatment and methods of drug screening that use such cells. Also provided are various tissue culture media, tissue culture media supplements, and kits useful for the generation of human microglial progenitor cells and human microglial cells.