The effects of electromagnetic interference (EMI) on operations of sensitive medical devices have been recognized as a critical concern related to safety in hospitals and healthcare institutions. This paper proposes an adaptive and distributed routing protocol that attempts to reduce the EMI introduced by a medical wireless sensor network (MWSN). The proposed algorithm, namely EMI-aware routing protocol (EMIR), assigns to each node a potential value which is dynamically calculated in such a way that network traffic tends to be deflected from nodes that are radiating high EMI and/or locating far away from gateways. Experiments in a real-life IEEE 802.15.4-based WSN implemented with the EMIR demonstrate that, compared to the shortest path routing, the proposed algorithm can significantly suppress the level of the EMI in the surrounding area where the WSN is deployed. Besides, the EMIR is scalable to the network size because it only requires one-hop neighbor information.