We have studied the interaction of water and graphene doped with nitrogen in different configurations, namely, graphitic and pyridinic nitrogen, by means of the van der Waals density functional. We found that the local nitrogen configuration plays a key role in determining the stable water configuration, while the dispersion force is responsible for the water adsorption. With the graphitic nitrogen, water prefers to orient with its oxygen toward the surface, whereas for the pyridinic nitrogen it prefers to orient with its hydrogens toward the surface, because nitrogen is positively and negatively charged for the former and the latter, respectively. Our results have great implications for the modeling of the interface between water and nitrogen-doped graphitic systems.