Targeted genome editing by artificial nucleases has brought the goal of site-specific transgene integration and gene correction within the reach of gene therapy. However, its application to long-term repopulating haematopoietic stem cells (HSCs) has remained elusive. Here we show that poor permissiveness to gene transfer and limited proficiency of the homology-directed DNA repair pathway constrain gene targeting in human HSCs. By tailoring delivery platforms and culture conditions we overcame these barriers and provide stringent evidence of targeted integration in human HSCs by long-term multilineage repopulation of transplanted mice. We demonstrate the therapeutic potential of our strategy by targeting a corrective complementary DNA into the IL2RG gene of HSCs from healthy donors and a subject with X-linked severe combined immunodeficiency (SCID-X1). Gene-edited HSCs sustained normal haematopoiesis and gave rise to functional lymphoid cells that possess a selective growth advantage over those carrying disruptive IL2RG mutations. These results open up new avenues for treating SCID-X1 and other diseases.