The onset of convection in a horizontal layer of a porous medium saturated with a viscoelastic nanofluid was studied in this article. The modified Darcy model was applied to simulate the momentum equation in porous media. An Oldroyd-B type constitutive eq