This study aimed to reveal the mechanistic basis of the melatonin-mediated amelioration of salinity stress in plants. Electrophysiological experiments revealed that melatonin decreased salt-induced K+ efflux (a critical determinant of plant salt tolerance) in a dose- and time-dependent manner and reduced sensitivity of the plasma membrane K+-permeable channels to hydroxyl radicals. These beneficial effects of melatonin were abolished by NADPH oxidase blocker DPI. Transcriptome analyses revealed that melatonin induced 585 (448 up- and 137 down-regulated) and 59 (54 up- and 5 down-regulated) differentially expressed genes (DEGs) in the root tip and mature zone, respectively. The most noticeable changes in the root tip were melatonin-induced increase in the expression of several DEGs encoding respiratory burst NADPH oxidases (OsRBOHA and OsRBOHF), calcineurin B-like/calcineurin B-like-interacting protein kinase (OsCBL/OsCIPK), and calcium-dependent protein kinase (OsCDPK) under salt stress. Melatonin also enhanced the expression of potassium transporter genes (OsAKT1, OsHAK1, and OsHAK5). Taken together, these results indicate that melatonin improves salt tolerance in rice by enabling K+ retention in roots, and that the latter process is conferred by melatonin scavenging of hydroxyl radicals and a concurrent OsRBOHF-dependent ROS signalling required to activate stress-responsive genes and increase the expression of K+ uptake transporters in the root tip.