The process of charge transfer based on triboelectrification (TE) and contact electrification (CE) has been recently utilized as the basis for a new and promising energy harvesting technology, i.e., triboelectric nanogenerators, as well as selfpowered sensors and systems. The electrostatic charge transfer between two surfaces can occur in both the TE and the CE modes depending on the involvement of relative sliding friction. Does the sliding behavior in TE induce any fundamental difference in the charge transfer from the CE? Few studies are available on this comparison because of the challenges in ruling out the effect of the contact area using traditional macro-scale characterization methods. This paper provides the first study on the fundamental differences in CE and TE at the nanoscale based on scanning probe microscopic methods. A quantitative comparison of the two processes at equivalent contact time and force is provided, and the results suggest that the charge transfer from TE is much faster than that from CE, but the saturation value of the transferred charge density is the same. The measured frictional energy dissipation of ~11 eV when the tip scans over distance of 1 Å sheds light on a potential mechanism: The friction may facilitate the charge transfer process via electronic excitation. These results provide fundamental guidance for the selection of materials and device structures to enable the TE or the CE in different applications; the CE mode is favorable for frequent moderate contact such as vibration energy harvesting and the TE mode is favorable for instant movement such as harvesting of energy from human walking.