Nonlinear dynamics of semiconductor nanolasers subjected to distributed feedbacks from fiber Bragg grating (FBG) are investigated through modified rate equations, which include the unique Purcell cavity-enhanced spontaneous emission factor F and spontaneous emission coupling factor β. In the analysis, the effects of F, β, frequency detuning, feedback strength, feedback delay, FBG bandwidth and length on chaotic performance are evaluated. It is observed that the approach of FBG feedback outperforms mirror feedback in terms of concealing time-delay signature and increasing effective bandwidth by choosing intermediate feedback strength and frequency detuning. Additionally, chaotic regions and the corresponding chaotic characteristics are revealed by dynamical mappings of nanolasers subjected to FBG feedback. The results show that decreased F, β and increased FBG bandwidth can extend the parameter range of chaos. However, the variation of feedback delay and FBG length has no obvious effect on TDS suppression and effective bandwidth enhancement. Most importantly, high quality optical chaos with low TDS and high effective bandwidth induced by increased dispersion is obtained within broad parameter regions considered, which is beneficial to achieving chaos-based applications.