Elasmobranch fishes (sharks, skates, and rays) have been hypothesized to use the geomagnetic field as a cue for orienting and navigating across a wide range of spatial scales. Magnetoreception has been demonstrated in many invertebrate and vertebrate taxa, including elasmobranchs, but this sensory modality and the cognitive abilities of cartilaginous fishes are poorly studied. Wild caught yellow stingrays, Urobatis jamaicensis (N = 8), underwent conditioning to associate a magnetic stimulus with a food reward in order to elicit foraging behaviors. Behavioral conditioning consisted of burying magnets and non-magnetic controls at random locations within a test arena and feeding stingrays as they passed over the hidden magnets. The location of the magnets and controls was changed for each trial, and all confounding sensory cues were eliminated. The stingrays learned to discriminate the magnetic stimuli within a mean of 12.6 ± 0.7 SE training sessions of four trials per session. Memory probes were conducted at intervals between 90 and 180 days post-learning criterion, and six of eight stingrays completed the probes with a ≥75% success rate and minimum latency to complete the task. These results show the fastest rate of learning and longest memory window for any batoid (skate or ray) to date. This study demonstrates that yellow stingrays, and possibly other elasmobranchs, can use a magnetic stimulus as a geographic marker for the location of resources and is an important step toward understanding whether these fishes use geomagnetic cues during spatial navigation tasks in the natural environment.