The microstructure of the Ti-doped MgB2 which shows a significantly improved critical current density, Jc [Appl. Phys. Lett. 79, 1154 (2001)], is investigated. It is found that Ti does not occupy the atomic site in the MgB2 crystal structure, but forms a thin TiB2 layer (with a thickness about one unit cell of TiB2) in the grain boundaries of MgB2. Besides, MgB2 grains are greatly refined by Ti doping, forming a strongly coupled nanoparticle structure. It is argued that the unique microstructure of the MgB2 nanoparticles with TiB2 nanograin boundaries may take responsibility for the enhancement of Jc in the Ti-doped MgB2 bulk superconductor.