Significance: Functional near-infrared spectroscopy (fNIRS) has become an important research tool in studying human brains. Accurate quantification of brain activities via fNIRS relies upon solving computational models that simulate the transport of photons through complex anatomy. Aim: We aim to highlight the importance of accurate anatomical modeling in the context of fNIRS and propose a robust method for creating high-quality brain/full-head tetrahedral mesh models for neuroimaging analysis. Approach: We have developed a surface-based brain meshing pipeline that can produce significantly better brain mesh models, compared to conventional meshing techniques. It can convert segmented volumetric brain scans into multilayered surfaces and tetrahedral mesh models, with typical processing times of only a few minutes and broad utilities, such as in Monte Carlo or finite-element-based photon simulations for fNIRS studies. Results: A variety of high-quality brain mesh models have been successfully generated by processing publicly available brain atlases. In addition, we compare three brain anatomical models-the voxel-based brain segmentation, tetrahedral brain mesh, and layered-slab brain model-and demonstrate noticeable discrepancies in brain partial pathlengths when using approximated brain anatomies, ranging between −1.5% to 23% with the voxelated brain and 36% to 166% with the layered-slab brain. Conclusion: The generation and utility of high-quality brain meshes can lead to more accurate brain quantification in fNIRS studies. Our open-source meshing toolboxes "Brain2Mesh" and "Iso2Mesh" are freely available at http://mcx.space/brain2mesh.