In this paper, we propose a wireless sensor network (WSN) whose behavior can be dynamically customized by injecting programs or roles specified by the user. To enable easy specification of the roles, a role-generation mechanism is also proposed. To realize the WSN, we introduce a reconfigurable wireless sensor node that has an ultra-low-power field-programmable gate array (FPGA) as well as a low-power microcontroller unit (MCU). By injecting several different roles into the sensor nodes, we confirmed that the behavior of the WSN can be changed on demand.