Although the stimulative effects on the normal behaviors of fish posed by ketamine (KET) were well‐studied, the adverse effects on the behavioral functions induced by KET at nighttime were unknown. Here, we used zebrafish larvae as a model exposed to KET (10, 50, 100, and 250 ng/L) at environmental levels for 21 days. The behavioral functions at nighttime, morphological changes during exposure stage, and alterations on the associated genes transcriptional levels of fish were determined. The difficultly initiating sleep was found in the fish exposed to KET, while the sleep duration of the animals was at the normal levels in exposure groups. The significant suppressions of the developmentally relevant genes, including bmp2, bmp4, and pth2ra were consistent with the developmental abnormalities of fish found in exposure groups. Moreover, the expression of γ‐aminobutyric acid (GABA) receptor increased and melatonin (MTN) receptor decreased while the levels of GABA and MTN remained unchanged after exposure, by gene expression analysis and molecular docking. In addition, the transcriptional expression of apoptotic genes, including tp53, aifm1, and casp6, was significantly upregulated by KET. After a 7‐day recovery, the insomnia‐like behaviors (shorter sleep duration) were observed in zebrafish from the 250 ng/L‐KET group. Accordingly, the adverse outcome pathway framework of KET was constructed by prognostic assessment of zebrafish larvae. This study suggested that the adverse outcomes of KET on the sleep health of organisms at environmentally relevant concentrations should be concerned.