We study the entangling power of a nanoelectromechanical system (NEMS) simultaneously interacting with two separately trapped ions. To highlight this entangling capability, we consider a special regime where the ion-ion coupling does not generate entanglement in the system, and any resulting entanglement will be the result of the NEMS acting as an entangling device. We study the dynamical behavior of the bipartite NEMS-induced ion-ion entanglement as well as the tripartite entanglement of the whole system (ions+NEMS). We found some quite remarkable phenomena in this hybrid system. For instance, the two trapped ions initially uncorrelated and prepared in coherent states can become entangled by interacting with a nanoelectromechanical resonator (also prepared in a coherent state) as soon as the ion-NEMS coupling achieve a certain value, and this can be controlled by external voltage gate on the NEMS device.