Since semiconductor devices are being scaled down to dimensions of several nanometers there is a growing need for techniques capable of quantitative analysis of dopant concentrations at the nanometer scale in all three dimensions. Imaging dopant contrast by scanning electron microscopy (SEM) is a very promising method, but many unresolved issues hinder its routine application for device analysis, especially in cases of buried layers where site-specific sample preparation is challenging. Here, we report on optimization of site-specific sample preparation by the focused Ga ion beam (FIB) technique that provides improved dopant contrast in SEM. Similar to FIB lamella preparation for transmission electron microscopy, a polishing sequence with decreasing ion energy is necessary to minimize the thickness of the electronically dead layer. We have achieved contrast values comparable to the cleaved sample, being able to detect dopant concentrations down to 1×1016 cm−3. A theoretical model shows that the electronically dead layer corresponds to an amorphized Si layer formed during ion beam polishing. Our results also demonstrate that contamination issues are significantly suppressed for FIB-treated samples compared with cleaved ones.