The Golgi apparatus is a critical intracellular organelle that is responsible for modifying, packaging, and transporting proteins to their destinations. Golgi homeostasis involving the acidic pH, ion concentration, and membrane potential, is critical for proper functions and morphology of the Golgi. Although transporters and anion channels that contribute to Golgi homeostasis have been identified, the molecular identity of cation channels remains unknown. Here we identify TMEM87A as a novel Golgi-resident cation channel that contributes to pH homeostasis and rename it as GolpHCat ( Gol gi pH -sensitive Cat ion channel). The genetic ablation of GolpHCat exhibits an impaired resting pH in the Golgi. Heterologously expressed GolpHCat displays voltage- and pH-dependent, non-selective cationic, and inwardly rectifying currents, with potent inhibition by gluconate. Furthermore, reconstitution of purified GolpHCat in liposomes generates functional channel activities with unique voltage-dependent gating and ion permeation. GolpHCat is expressed in various cell types such as neurons and astrocytes in the brain. In the hippocampus, GolpHCat-knockout mice show dilated Golgi morphology and altered glycosylation and protein trafficking, leading to impaired spatial memory with significantly reduced long-term potentiation. We elucidate that GolpHCat, by maintaining Golgi membrane potential, regulates ionic and osmotic homeostasis, protein glycosylation/trafficking, and brain functions. Our results propose a new molecular target for Golgi-related diseases and cognitive impairment.