The second near-infrared (NIR-II, 1000-1700 nm) fluorescent probes have significant advantages over visible or NIR-I (600-900 nm) imaging for both depth of penetration and level of resolution. Since the blood-brain barrier (BBB) prevents most molecules from entering the central nervous system, NIR-II dyes with large molecular frameworks have limited applications for brain imaging. In this work, we developed a series of boron difluoride (BF2) formazanate NIR-II dyes, which had tunable photophysical properties, ultrahigh photostability, excellent biological stability, and strong brightness. Modulation of the aniline moiety of BF2 formazanate dyes significantly enhances their abilities to cross the BBB for noninvasive brain imaging. Furthermore, the intact mouse brain imaging and dynamic dye diffusion across the BBB were monitored using these BF2 formazanate dyes in the NIR-II region. In murine glioblastoma models, these dyes can differentiate tumors from normal brain tissues. We anticipate that this new type of small molecule will find potential applications in creating probes and drugs relevant to theranostic for brain pathologies.