Oligodendrocytes are the myelinating cells of the central nervous system. For regenerative cell therapy in demyelinating diseases, there is significant interest in deriving a pure population of lineage-committed oligodendrocyte precursor cells (OPCs) for transplantation. OPCs are characterized by the activity of the transcription factor Olig2 and surface expression of a proteoglycan NG2. Using the GFP-Olig2 (G-Olig2) mouse embryonic stem cell (mESC) reporter line, we optimized conditions for the differentiation of mESCs into GFP+Olig2+NG2+ OPCs. In our protocol, we first describe the generation of embryoid bodies (EBs) from mESCs. Second, we describe treatment of mESC-derived EBs with small molecules: (1) retinoic acid (RA) and (2) a sonic hedgehog (Shh) agonist purmorphamine (Pur) under defined culture conditions to direct EB differentiation into the oligodendroglial lineage. By this approach, OPCs can be obtained with high efficiency (>80%) in a time period of 30 days. Cells derived from mESCs in this protocol are phenotypically similar to OPCs derived from primary tissue culture. The mESC-derived OPCs do not show the spiking property described for a subpopulation of brain OPCs in situ. To study this electrophysiological property, we describe the generation of spiking mESC-derived OPCs by ectopically expressing Na(V;)1.2 subunit. The spiking and nonspiking cells obtained from this protocol will help advance functional studies on the two subpopulations of OPCs.