In this paper, the boundary feedback control problem for the Euler–Bernoulli beam with unknown time-varying distributed load and boundary disturbance is investigated. Based on the Lagrangian–Hamiltonian mechanics, the model of the beam is derived as a partial differential equation. To suppress the external disturbance, two disturbance rejection control approaches are adopted in the control design. Firstly, a disturbance observer is designed to estimate the boundary disturbance online. Thus, the effect of the boundary disturbance can be canceled directly in the feedback loop. A time-varying function is applied in the disturbance observer to prevent an excessively large control input. Secondly, a new observer is developed to estimate the upper bound of the disturbance and a sign function is introduced to suppress the influence of the disturbance without demanding the boundedness of the derivative of the boundary disturbance. The well-posedness and the uniform boundedness of the closed-loop system are proved using the operator semigroup theory and the Lyapunov method. Numerical comparisons with existing results are made for demonstrating the advantages of the proposed approaches.