Prenatal propofol exposure induced neurotoxicity in the developing brains and led to persistent learning deficits in the offspring. Our goal was to use zebrafish to explore whether the decline in learning and memory was correlated with inhibition of neuronal growth after propofol exposure. Zebrafish embryos at 6 hours postfertilization (hpf) were exposed to control or 1, 2 or 4 μg/mL propofol until 48 hpf. Spontaneous locomotor activity and swimming behavior in response to dark‐to‐light photoperiod stimulation were studied in zebrafish larvae at 6 days postfertilization (dpf). The adaptability to repeated stimulation was used to indicate learning and memory function of larvae. Transgenic NBT line zebrafish was used to quantitate the effect of propofol on motor neuronal growth of embryos in vivo. Six dpf transgenic zebrafish larvae went through photoperiod stimulation after their neuronal length had been analyzed during the embryonic period. Our data indicate that embryonic exposure to 1, 2 and 4 μg/mL propofol had no adverse effect on spontaneous movement in zebrafish larvae, but 2 and 4 μg/mL propofol significantly impaired the learning and memory function of larvae. Moreover, propofol significantly inhibited axonal growth of motor neurons during the embryonic stage, which was correlated with learning and memory deficiency in larvae. Our findings demonstrate that the neuronal growth was correlated with learning and memory function, indicating the relevance of zebrafish as a new model to explore the mechanisms through which propofol induces long‐term learning and memory impairment.