The aim of the article is to research the unsteady magnetohydrodynamic stagnation-point flow of fractional Oldroyd-B fluid over a stretched sheet. According to the distribution characteristics of pressure and magnetic field near the stagnation point, the momentum equation based on a fractional Oldroyd-B constitutive model is derived. Moreover, the modified fractional Fourier's law considering thermal relaxation-retardation time is proposed, which applies in both the energy equation and the boundary condition of convective heat transfer. A new finite difference scheme combined with the L1 algorithm is established to solve the governing equations, whose convergence is confirmed by constructing an exact solution. The results indicate that the larger relaxation parameters of velocity block the flow, yet the retardation parameters of velocity show the opposite trend. It is particularly worth mentioning that all the temperature profiles first go up slightly to a maximal value and then descend markedly, which presents the thermal retardation characteristic of Oldroyd-B fluid. Additionally, under the effects of temperature's retardation and relaxation parameters, the intersection of the profiles far away from stretching sheet demonstrates the thermal memory characteristic.