A new methodology is presented in this work to identify the viscoelastic boundary conditions and dynamical response of Euler-Bernoulli beams under a moving load. A new expression for the transmissibility function of the beam output responses with unknown viscoelastic boundary conditions with Voigt and more generalized four-element models is derived. The proposed identification method uses modal shapes with a pattern search optimization scheme. Finite element simulation was used to demonstrate the validity of the proposed method. The acceleration response from different locations on the beam was utilized in the identification of the boundary conditions considering six optimization cases. The proposed method provided solutions of the boundaries that can satisfy the requirements of the natural frequencies and damping ratios simultaneously. The effects of the number of selected measurement locations, participant modes, and measurement noise on the accuracy of the resulting boundary parameters were investigated. The results showed that the use of three complex modes and eight measurement points provided an accurate estimation of the modal parameters and reduced the relative error effectively in the resulting eight unknown boundary coefficients, under noise-free and corrupted acceleration signals with 5% noise conditions.