Exposure to anesthetic drugs is common in biomedical sciences being part of routine procedures in different translational species, however its impacts on memory and cognition are still debated, having different impacts depending on drug and age. The zebrafish (Danio rerio) is a translational species widely used in behavioral neuroscience, where tricaine methanesulfonate (MS222) is the most acceptable and used drug when conducting routine procedures. Based on this, we investigated the effects of MS222 (100 mg/l) in young adults and aging zebrafish 1, 2, 3, and 7 days after exposure. Animals’ were submitted to the anesthetic procedure until loss of body posture, slowing of opercular movements and lack of response to tail touch with a plastic pipette were achieved, then further left in the drug for 3 min. After that, animals (6 mpf vs. 24 mpf) were transferred to a recovery tank until fully recovered and transferred back to their housing system until further testing in the free movement pattern (FMP) Y-maze, which assesses zebrafish working memory and cognitive lexibility. Young animals had significant impairment in their working memory and cognitive flexibility 1 and 2 days after the exposure to MS222, being fully recovered by day 3 and with no effects 7 days post drug exposure. Increased repetitions were also observed for animals exposed to MS222 which could indicate increased stress-related response in animals up to 2 days after drug exposure. No drug effect was observed in aging animals besides their natural decreased alternations and working memory. Overall, behavioral experiments after routine procedures using MS222 should be performed with caution and need to be delayed, at least 3 days after exposure where working memory, cognitive flexibility, and repetitive behavior are back to normal.