Theoretical models of stellar evolution predict that most of the lithium inside a star is destroyed as the star becomes a red giant. However, observations reveal that about 1% of red giants are peculiarly rich in lithium, often exceeding the amount in the interstellar medium or predicted from the Big Bang. With only about 150 lithium-rich giants discovered in the past four decades, and no distinguishing properties other than lithium enhancement, the origin of lithium-rich giant stars is one of the oldest problems in stellar astrophysics. Here we report the discovery of 2,330 low-mass (1 to 3$,M_odot$) lithium-rich giant stars, which we argue are consistent with internal lithium production that is driven by tidal spin-up by a binary companion. Our sample reveals that most lithium-rich giants have helium-burning cores ($80^{+7}_{-6}%$), and that the frequency of lithium-rich giants rises with increasing stellar metallicity. We find that while planet accretion may explain some lithium-rich giants, it cannot account for the majority that have helium-burning cores. We rule out most other proposed explanations as the primary mechanism for lithium-rich giants, including all stages related to single star evolution. Our analysis shows that giants remain lithium-rich for only about two million years. A prediction from this lithium depletion timescale is that most lithium-rich giants with a helium-burning core have a binary companion.