The capacity for self-renewal and differentiation of human embryonic stem (ES) cells makes them a potential source for generation of pancreatic beta cells for treating type I diabetes mellitus. Here, we report a newly developed and effective method, carried out in a serum-free system, which induced human ES cells to differentiate into insulin-producing cells. Activin A was used in the initial stage to induce definitive endoderm differentiation from human ES cells, as detected by the expression of the definitive endoderm markers Sox17 and Brachyury. Further, all-trans retinoic acid (RA) was used to promote pancreatic differentiation, as indicated by the expression of the early pancreatic transcription factors pdx1 and hlxb9. After maturation in DMEM/F12 serum-free medium with bFGF and nicotinamide, the differentiated cells expressed islet specific markers such as C-peptide, insulin, glucagon and glut2. The percentage of C-peptide-positive cells exceeded 15%. The secretion of insulin and C-peptide by these cells corresponded to the variations in glucose levels. When transplanted into renal capsules of Streptozotocin (STZ)-treated nude mice, these differentiated human ES cells survived and maintained the expression of beta cell marker genes, including C-peptide, pdx1, glucokinase, nkx6.1, IAPP, pax6 and Tcf1. Thirty percent of the transplanted nude mice exhibited apparent restoration of stable euglycemia; and the corrected phenotype was sustained for more than six weeks. Our new method provides a promising in vitro differentiation model for studying the mechanisms of human pancreas development and illustrates the potential of using human ES cells for the treatment of type I diabetes mellitus.