The genetic basis of brain structure and function is largely unknown. We carried out genome-wide association studies of 3,144 distinct brain imaging derived phenotypes in UK Biobank. Notable significant associations include: iron-related genes linked to T2* in subcortical regions; extracellular matrix associated with white matter microstructure and lesion volume; genes regulating midline axon guidance related to pontine crossing tract organisation. More broadly, effects were mainly seen in imaging measures associated with genes involved in brain development and transport of nutrients. Genes implicated in neurodegenerative disorders were largely related to iron and cardiovascular traits, and to brain development for psychiatric disorders.