In this Letter, we propose a novel, to the best of our knowledge, technique to generate short-wavelength radiation carrying time-varying orbital angular momentum (OAM) by tailoring relativistic beams in free-electron lasers. To manipulate the temporal properties of OAM beams, two time-delayed seed lasers with different OAM values are used to interact with the electron beam in the undulator. With this method, high-harmonic electron beam microbunching with a time-varying helical distribution can be tailored to match the time-varying instantaneous helical phase structure of the x ray beams. Theoretical and simulation results demonstrate that high-power x ray beams with time-varying OAM can be produced by the proposed technique, which opens new routes to scientific research in x ray science.