Nitrogen-vacancy (NV) centers in diamond can be used as quantum sensors to image the magnetic field with nanoscale resolution. However, nanoscale electric-field mapping has not been achieved so far because of the relatively weak coupling strength between NV and electric field. Using individual shallow NVs, here we succeeded to quantitatively image the contours of electric field from a sharp tip of a qPlus-based atomic force microscope (AFM), and achieved a spatial resolution of ~10 nm. Through such local electric fields, we demonstrated electric control of NVs charge state with sub-5 nm precision. This work represents the first step towards nanoscale scanning electrometry based on a single quantum sensor and may open up new possibility of quantitatively mapping local charge, electric polarization, and dielectric response in a broad spectrum of functional materials at nanoscale.