Millisecond pulsars are neutron stars (NSs) that are thought to have been spun-up by mass accretion from a stellar companion. It is unknown whether there is a natural brake for this process, or if it continues until the centrifugal breakup limit is reached at submillisecond periods. Many NSs that are accreting from a companion exhibit thermonuclear X-ray bursts that last tens of seconds, caused by unstable nuclear burning on their surfaces. Millisecond brightness oscillations during bursts from ten NSs (as distinct from other rapid X-ray variability that is also observed) are thought to measure the stellar spin, but direct proof of a rotational origin has been lacking. Here, we report the detection of burst oscillations at the known spin frequency of an accreting millisecond pulsar, and we show that these oscillations always have the same rotational phase. This firmly establishes burst oscillations as nuclear-powered pulsations tracing the spin of accreting NSs, corroborating earlier evidence. The distribution of spin frequencies of the 11 nuclear-powered pulsars cuts off well below the breakup frequency for most NS models, supporting theoretical predictions that gravitational radiation losses can limit accretion torques in spinning up millisecond pulsars.