The combination of graphene with molecules offers promising opportunities to achieve new functionalities. In these hybrid structures, interfacial charge transfer plays a key role in the electronic properties and thus has to be understood and mastered. Using scanning tunneling microscopy and ab initio density functional theory calculations, we show that combining nitrogen doping of graphene with an electric field allows for a selective control of the charge state in a molecular layer on graphene. On pristine graphene, the local gating applied by the tip induces a shift of the molecular levels of adsorbed molecules and can be used to control their charge state. Ab initio calculations show that under the application of an electric field, the hybrid molecule/graphene system behaves like an electrostatic dipole with opposite charges in the molecule and graphene sub-units that are found to be proportional to the electric field amplitude, which thereby controls the charge transfer. When local gating is combined with nitrogen doping of graphene, the charging voltage of molecules on nitrogen is greatly lowered. Consequently, applying the proper electric field allows one to obtain a molecular layer with a mixed charge state, where a selective reduction is performed on single molecules at nitrogen sites.