We describe a chemically defined protocol for efficient differentiation of human embryonic stem cells (hESCs) to neural epithelial cells and then to functional spinal motor neurons. This protocol comprises four major steps. Human ESCs are differentiated without morphogens into neuroepithelial cells that form neural tube-like rosettes in the first 2 weeks. The neuroepithelial cells are then specified to OLIG2-expressing motoneuron progenitors in the presence of retinoic acid (RA) and sonic hedgehog (SHH) in the following 2 weeks. These OLIG2 progenitors generate postmitotic, HB9 expressing motoneurons at the fifth week and mature to functional motor neurons thereafter. The protein factor SHH can be replaced by a small molecule purmorphamine in the entire process, which may facilitate potential clinical applications. This protocol has been shown equally effective in generating motor neurons from human induced pluropotent stem (iPS) cells.