Cognitive functioning is heritable, with metabolic risk factors known to accelerate age-associated cognitive decline. Identifying genetic underpinnings of cognition is thus crucial. Here, we undertake single-variant and gene-based association analyses upon six neurocognitive phenotypes across six cognition domains in whole-exome sequencing data from 157,160 individuals in the UK Biobank to expound the genetic architecture of human cognition. We further identify genetic variants interacting with APOE, a significant genetic risk factor for cognitive decline, while controlling for lipid and glycemic risks, towards influencing cognition. Additionally, considering lipid and glycemic traits, we conduct bivariate analysis to underscore pleiotropic effects and also highlight suggestive mediation effects of metabolic risks on cognition. We report 18 independent novel loci associated with five cognitive domains while controlling for APOE isoform-carrier status and metabolic risk factors. Our novel variants are mostly in genes which could also impact cognition via their functions on synaptic plasticity and connectivity, oxidative stress, neuroinflammation. Variants in or near these identified loci show genetic links to cognitive functioning in association with APOE, Alzheimers disease and related dementia phenotypes and brain morphology phenotypes, and are also eQTLs significantly controlling expression of their corresponding genes in various regions of the brain. We further report four novel pairwise interactions between exome-wide significant loci and APOE variants influencing episodic memory, and simple processing speed while accounting for serum lipid and serum glycemic traits. We obtain both APOC1 and LRP1 as significantly associated with complex processing speed and visual attention in our gene-based analysis. They also exhibit significant interaction effect with APOE variants in influencing visual attention. We find that variants in APOC1 and LRP1 act as significant eQTLs for regulating their expression in basal ganglia and cerebellar hemispheres, crucial to visual attention. Taken together, our findings suggest that APOC1 and LRP1 have plausible roles along pathways of amyloid-beta, lipid and/or glucose metabolism in affecting visual attention and complex processing speed. Interestingly, variants in MTFR1L, PPFIA1, PCDHB16, ATP2A1 show evidence of pleiotropy and mediation effects through serum glucose/HDL levels affecting four different cognition domains. This is the first report from large-scale exome-wide study with evidence underscoring the effect of LRP1 on cognition. Our research highlights a novel set of loci that augments our understanding of the genetic underpinnings of cognition during ageing, considering co-occurring metabolic conditions that can confer genetic risk to cognitive decline in addition to APOE, which can aid in finding causal determinants of cognitive decline.