Boldness and risk‐taking behaviours in animals are important traits to obtain advantages such as habitation, food resources, reproductive success and social dominance. Risk‐taking behaviour is influenced by physiological and environmental conditions; however, whether individual fish become bolder by the presence of conspecifics remains unknown. In this study, a light–dark preference test was conducted using medaka fish (Oryzias latipes) with or without a neighbouring conspecific. It was found that individual medaka male fish preferred a light environment and avoided a dark environment, whereas the display of a neighbouring conspecific enhanced the time the male spent in the dark environment (i.e., this condition encouraged risk‐taking). The blood glucose level increased in fish confined to the dark condition but did not increase in light‐preferring fish and risk‐taking fish. Large somata expressing tyrosine hydroxylase, which is the rate‐limiting enzyme in dopamine synthesis, were detected in the telencephalic and diencephalic brain regions in risk‐taking medaka, whereas large somata were detected in the diencephalic region in medaka confined to the dark condition. These findings indicated that medaka is a good fish model to explore the central roles of dopaminergic neurons in the telencephalon and the diencephalon, which regulate risk‐taking behaviour.