Within populations, individual differences in behavioral and cognitive traits are dependent on the habitat and specific contexts, such as the presence of a predator or other risks. The ability to show variable responses to changing conditions can be of immense survival advantage to organisms. We studied individual differences in specific personality traits, such as boldness, exploration, and spatial ability, and the effect of these traits on learning ability and memory in the presence of a predatory threat, among wild caught zebrafish (Danio rerio). Under laboratory conditions, individuals were trained to perform a simple navigation task, and their performance, exploration, boldness traits were measured, along with learning and memory abilities under two contexts (i.e., in the presence and absence of a predator). Our results revealed that fish showed a clear decline in emergence time, exploration time, and feeding latency over trials, indicative of learning, and further tests for memory also showed memory retention. While the presence of a predator increased emergence time and latencies for navigating, indicating declines in boldness and exploration, these were found to be correlated to different personalities among the individuals and dependent on their sex. While females tended to be bolder and learned the spatial task faster, they showed lower memory retention abilities than males. Personality traits were also found to affect cognitive abilities among individuals. In general, the presence of a predator decreased performance latencies. However, bolder individuals were less affected and emerged more quickly from the refuge chamber than shy individuals. Our results point to the complex interplay of ecological context along with inherent correlations across personality traits that decide the overall personality and cognitive responses among individuals even within populations. These findings thus highlight the importance of an inclusive approach that combines personality and cognition studies for understanding variations within populations.