We have constructed a comprehensive database that traces the publications of father-son pairs in the premodern academic realm (1088–1800), examining the contribution of the inherited human capital versus nepotism to occupational persistence during this period. Our findings indicate that nepotism declined at times when the misallocation of talent across professions incurred greater social costs. Specifically, nepotism was less common in fields experiencing rapid changes in the knowledge frontier, particularly in the sciences and within Protestant institutions. Most notably, nepotism sharply declined during the Scientific Revolution and the Enlightenment, when departures from meritocracy arguably became both increasingly inefficient and socially intolerable.