Two-pore domain potassium (K2P) channels play a central role in modulating cellular excitability and neuronal function. The unique structure of the selectivity filter in K2P and other potassium channels determines their ability to allow the selective passage of potassium ions across cell membranes. The nematode
C. elegans
has one of the largest K2P families, with 47 subunit-coding genes. This remarkable expansion has been accompanied by the evolution of atypical selectivity filter sequences that diverge from the canonical TxGYG motif. Whether and how this sequence variation may impact the function of K2P channels has not been investigated so far. Here, we show that the UNC-58 K2P channel is constitutively permeable to sodium ions and that a cysteine residue in its selectivity filter is responsible for this atypical behavior. Indeed, by performing in vivo electrophysiological recordings and Ca
2+
imaging experiments, we demonstrate that UNC-58 has a depolarizing effect in muscles and sensory neurons. Consistently,
unc-58
gain-of-function mutants are hypercontracted, unlike the relaxed phenotype observed in hyperactive mutants of many neuromuscular K2P channels. Finally, by combining molecular dynamics simulations with functional studies in
Xenopus laevis
oocytes, we show that the atypical cysteine residue plays a key role in the unconventional sodium permeability of UNC-58. As predicting the consequences of selectivity filter sequence variations in silico remains a major challenge, our study illustrates how functional experiments are essential to determine the contribution of such unusual potassium channels to the electrical profile of excitable cells.