The direct and selective dehydration of primary alcohols remains a longstanding challenge due to the instability of primary carbocations and the high barrier associated with alkene-like E2 transition states. Here we report a cobalt-catalyzed, photoelectrochemical strategy for the direct conversion of primary alcohols to terminal alkenes. The reaction proceeds in an undivided cell under blue-light irradiation, employing a readily available CoCl2/dimethylglyoxime (dmgH2) catalyst system. This method displays broad substrate scope, high regioselectivity across polyol frameworks, and exceptional tolerance of oxidation-sensitive functional groups, enabling late-stage diversification of natural products and drug derivatives. Mechanistic studies support a radical-based catalytic cycle initiated by anodic alcohol activation and completed via light-driven β-hydrogen abstraction. In contrast, without irradiation, the same conditions yield deoxygenated alkanes via a mechanistically distinct, electroreductive Co-C bond homolysis and HAT pathway. Together, these findings establish a mild and general platform for direct and selective dehydration of primary alcohols.