Inbreeding impairs the cognitive abilities of humans, but its impact on cognition in other animals is poorly studied. For example, environmental stress (e.g. food limitation and extreme temperatures) often amplifies inbreeding depression in morphological traits, but whether cognition is similarly affected is unclear. We, therefore, tested if a higher temperature (30°C versus 26°C) during development exacerbates any difference in inhibitory control between inbred ( f = 0.25) and outbred guppies ( Poecilia reticulata ). Inhibitory control is an aspect of cognition that is often measured in vertebrates using a detour test, in which animals have to navigate around a transparent barrier to reach a reward. We also tested if inbreeding and temperature affect ‘boldness’, which is a putative personality trait in guppies. Inbreeding lowered inhibitory control of guppies raised at the higher temperature but not those raised at the control temperature. Inbred fish were significantly less bold than outbred fish. In addition, males, but not females, raised at the higher temperature had significantly lower inhibitory control. There was no effect of temperature on the boldness of either sex. Our study is among the first to test if experimentally induced inbreeding impairs cognition in a non-domesticated vertebrate. We show that both inbreeding and higher temperatures during development can affect the behaviour and cognitive abilities of fish. These findings are noteworthy given the twin threats of rising global temperatures and more frequent inbreeding as habitat fragmentation reduces population sizes.