Nonribosomal peptide synthetases (NRPSs) and NRPS-like enzymes have diverse functions in primary and secondary metabolisms. By using a structure-guided approach, we uncovered the function of a NRPS-like enzyme with unusual domain architecture, catalyzing two sequential two-electron reductions of glycine betaine to choline. Structural analysis based on the homology model suggests cation-π interactions as the major substrate specificity determinant, which was verified using substrate analogs and inhibitors. Bioinformatic analysis indicates this NRPS-like glycine betaine reductase is highly conserved and widespread in kingdom fungi. Genetic knockout experiments confirmed its role in choline biosynthesis and maintaining glycine betaine homeostasis in fungi. Our findings demonstrate that the oxidative choline-glycine betaine degradation pathway can operate in a fully reversible fashion and provide insight in understanding fungal choline metabolism. The use of an NRPS-like enzyme for reductive choline formation is energetically efficient compared with known pathways. Our discovery also underscores the capabilities of the structure-guided approach in assigning functions of uncharacterized multidomain proteins, which can potentially aid functional discovery of new enzymes by genome mining.