General cognitive function is a prominent human trait associated with many important life outcomes 1,2 , including longevity 3 . The substantial heritability of general cognitive function is known to be polygenic, but it has had little explication in terms of the contributing genetic variants 4,5,6 . Here, we combined cognitive and genetic data from the CHARGE and COGENT consortia, and UK Biobank (total N=280,360; age range = 16 to 102). We found 9,714 genome-wide significant SNPs ( P <5 x 10 −8 ) in 99 independent loci. Most showed clear evidence of functional importance. Among many novel genes associated with general cognitive function were SGCZ , ATXN1 , MAPT , AUTS2 , and P2RY6 . Within the novel genetic loci were variants associated with neurodegenerative disorders, neurodevelopmental disorders, physical and psychiatric illnesses, brain structure, and BMI. Gene-based analyses found 536 genes significantly associated with general cognitive function; many were highly expressed in the brain, and associated with neurogenesis and dendrite gene sets. Genetic association results predicted up to 4% of general cognitive function variance in independent samples. There was significant genetic overlap between general cognitive function and information processing speed, as well as many health variables including longevity.