Provided is a rotary shaft structure, comprising an upper-rod fixing shaft (1), a lower-rod fixing shaft (2), a tightening screw (3), and an interfitting internally threaded shaft (4) and locking pin (5); at least one end of the upper- and lower-rod fixing shafts is located inside the lower- and upper-rod fixing shafts, respectively, and the upper-rod fixing shaft (1) and lower-rod fixing shaft (2) may rotate with respect to each other; the lower-rod fixing shaft (2) end away from the tightening screw (3) is also provided with a lock groove (21) fitting the locking pin (5); the upper- and lower-rod fixing shafts are internally provided with a spring (6), and the side wall of the lower-rod fixing shaft (2) is provided with a rotation groove (7); the two ends of the spring (6) are fixedly connected to the upper-rod fixing shaft (1) and the locking pin (5), respectively. The rotary shaft structure is such that when a user is adjusting the angle between the upper rod and lower rod of a lamp, one need only lightly