The macula, located near the center of the retina in the human eye, is responsible for providing critical functions, such as central, sharp vision. Structural changes in the macula are associated with many ocular diseases, including age-related macular degeneration (AMD) and glaucoma. Although macular thickness is a highly heritable trait, there are no prior reported genome-wide association studies (GWASs) of it. Here we describe the first GWAS of macular thickness, which was measured by spectral-domain optical coherence tomography using 68 423 participants from the UK Biobank cohort. We identified 139 genetic loci associated with macular thickness at genome-wide significance (P < 5 × 10 −8). The most significant loci were LINC00461 (P = 5.1 × 10 −120), TSPAN10 (P = 1.2 × 10 −118), RDH5 (P = 9.2 × 10 −105) and SLC6A20 (P = 1.4 × 10 −71). Results from gene expression demonstrated that these genes are highly expressed in the retina. Other hits included many previously reported AMD genes, such as NPLOC4 (P = 1.7 × 10 −103), RAD51B (P = 9.1 × 10 −14) and SLC16A8 (P = 1.7 × 10 −8), further providing functional significance of the identified loci. Through cross-phenotype analysis, these genetic loci also exhibited pleiotropic effects with myopia, neurodegenerative diseases (e.g. Parkinson's disease, schizophrenia and Alzheimer's disease), cancer (e.g. breast, ovarian and lung cancers) and metabolic traits (e.g. body mass index, waist circumference and type 2 diabetes). Our findings provide the first insight into the genetic architecture of macular thickness and may further elucidate the pathogenesis of related ocular diseases, such as AMD.