Human pluripotent stem cells represent a potentially unlimited source of functional pancreatic endocrine lineage cells. Here we report a highly efficient approach to induce human embryonic stem (ES) cells and induced pluripotent stem (iPS) cells to differentiate into mature insulin-producing cells in a chemical-defined culture system. The differentiated human ES cells obtained by this approach comprised nearly 25% insulin-positive cells as assayed by flow cytometry analysis, which released insulin/C-peptide in response to glucose stimuli in a manner comparable to that of adult human islets. Most of these insulin-producing cells co-expressed mature beta cell-specific markers such as NKX6-1 and PDX1, indicating a similar gene expression pattern to adult islet beta cells in vivo. In this study, we also demonstrated that EGF facilitates the expansion of PDX1-positive pancreatic progenitors. Moreover, our protocol also succeeded in efficiently inducing human iPS cells to differentiate into insulin-producing cells. Therefore, this work not only provides a new model to study the mechanism of human pancreatic specialization and maturation in vitro, but also enhances the possibility of utilizing patient-specific iPS cells for the treatment of diabetes.