The embryonic and fetal brains of all mammals develop in similar ways. The embryonic spinal cord develops along common sequences and patterns. The nervous system emerges from a simple elongated tube of cells, called the notochord. The head (cranial) end of the embryonic tube expands and differentiates more robustly (than does the spinal end) into several clusters of cells which emerge as the forebrain (telencephalon and diencephalon), midbrain (mesencephalon) and hindbrain (metencephalon and myelencephalon) portions.
Please, compare to brain evolution.