Cortical structures in the central nervous system exhibit an ordered laminar organization. Defined cell layers are significant to our understanding of brain structure and function. In this work, multiphoton microscopy (MPM) based on second harmonic generation (SHG) and two-photon excited fluorescence (TPEF), which was applied for qualitatively visualizing the structure of cerebral and cerebellar cortex from the fresh, unfixed, and unstained specimen. MPM is able to effectively identify neurons and neurites in cerebral cortex, as well as glial cells, Purkinje cells, and granule cells in cerebellar cortex at subcellular resolution. In addition, the use of automated image processing algorithms can quantify the circularity of neurons and the density distribution of neurites based on the intrinsic nonlinear optical contrast, further providing quantitative characteristics for automatically analyzing the laminar structure of cortical structures. These results suggest that with the development of the feasibility of two-photon fiberscopes and microendoscope probes, the combined MPM and image analysis holds potential to provide supplementary information to augment the diagnostic accuracy of neuropathology and in vivo identification of various neurological illnesses in clinic.