Building on Borjas (1993) I develop an intergenerational model of self-selection of migration and education that allows for a complex selection mechanism. In particular, it allows for the possibility that agents are selected differently depending on the schooling level they choose. As in Mayer (2005) I assume that agents are endowed with two abilities, manual and intellectual, and use the intergenerational structure of the model to infer potential earnings of a person for different levels of education and in different countries. This makes it possible to quantify the self selection bias of estimates of the return to education and migration. The model is estimated using data on Mexicans in the US from the CPS and on Mexicans residents in Mexico from the Mexican census. The findings are that there is a significant loss of human capital faced by immigrants that is not transmitted to their children. While immigrants are observed to earn less because they find it difficult to adapt their skills to the host country, their children earn more because they can inherit all the abilities of their parents, including that part that could not be used for producing earnings. Moreover, in the case of immigrants, parents with larger amounts of intellectual ability migrate more and tend to choose to remain high school educated. However, they migrate with the expectation of their children becoming college educated. Therefore, measures that rely on the earnings performance and educational attainment of immigrants underestimate the amount of human capital they bring into the host country.