This paper presents a moving horizon estimation (MHE) approach for estimating flow and pressure inside the annulus during managed pressure drilling (MPD). MPD is an advanced pressure control method that is used to precisely control the annular pressure throughout the wellbore in oil well drilling. The MPD model, which is a hyperbolic-type partial differential equation (PDE), is a hydraulic model based on basic fluid dynamics. Using an early lumping approach, the model yields a high-dimensional system of an ordinary differential equation (ODE). We show the adjoint-based method combined with a line search algorithm can solve the MHE dynamic optimization problem efficiently. The estimator is tested using data from a field scale flow-loop test conducted in Stavanger, Norway by the oil company Statoil.