Islets of Langerhans are a pancreatic endocrine compartment consisting of insulin-producing β cells together with several other hormone-producing cells. While some insulin-producing cells or immature pancreatic cells have been generated in vitro from ES and iPS cells, islets with proper functions and a three-dimensional (3D) structure have never been successfully produced. To test whether islets can be formed in vitro, we first examined the potential of mouse fetal pancreatic cells. We found that E16.5 pancreatic cells, just before forming islets, were able to develop cell aggregates consisting of β cells surrounded by glucagon-producing α cells, a structure similar to murine adult islets. Moreover, the transplantation of these cells improved blood glucose levels in hyperglycemic mice. These results indicate that functional islets are formed in vitro from fetal pancreatic cells at a specific developmental stage. By adopting these culture conditions to the differentiation of mouse iPS cells, we developed a two-step system to generate islets, i.e. immature pancreatic cells were first produced from iPS cells, and then transferred to culture conditions that allowed the formation of islets from fetal pancreatic cells. The islets exhibited distinct 3D structural features similar to adult pancreatic islets and secreted insulin in response to glucose concentrations. Transplantation of the islets improved blood glucose levels in hyperglycemic mice. In conclusion, the two-step culture system allows the generation of functional islets with a 3D structure from iPS cells.