In this paper, the high-order solution of a viscoelastic fluid is investigated using the discontinuous Galerkin (DG) method. The Oldroyd-B model is used to describe the viscoelastic behavior of the fluid flow. The high-order accuracy of the applied DG method is verified for a Newtonian benchmark problem with an exact solution. Next, the same algorithm is utilized to solve the viscoelastic flow by separating the stress tensor into the stress due to the Newtonian solvent and the stress due to the solved viscoelastic polymers. The high-order accuracy of the solution for viscoelastic flow is demonstrated by solving the planar Poiseuille flow. Then, the planar contraction problem is simulated as a benchmark for the viscoelastic flow. The obtained results are in good agreement with the results in the literature for both creeping and inertial flow when high-order polynomials were used even on coarse meshes.