Spatial cognitive abilities allow individuals to remember the location of resources such as food patches, predator hide-outs, or shelters. Animals typically incorporate learnt spatial information or use external environmental cues to navigate their surroundings. A spectacular example of how some fishes move is through aerial jumping. For instance, fish that are trapped within isolated pools, cut off from the main body of water during dry periods, may jump over obstacles and direct their jumps to return to safe locations. However, what information such as re-orientation behaviour during jumping is based on remains enigmatic. Here we combine a lab and field experiment to test if guppies (Poecilia reticulata) incorporate learnt spatial information and external environmental cues (visual and auditory) to determine where to jump. In a spatial memory assay we found that guppies were more likely to jump towards deeper areas, hence incorporating past spatial information to jump to safety. In a matched vs. mismatched spatial cue experiment in the field, we found that animals only showed directed jumping when visual and auditory cues matched. We show that in unfamiliar entrapments guppies direct their jumps by combining visual and auditory cues, while in familiar entrapments they use a cognitive map. We hence conclude that jumping behaviour is a goal-directed behaviour, guided by different sources of information and involving important spatial cognitive skills.