The present paper deals with the behavior of gyrotactic microorganisms in nanofluid affected by the magnetic field and porous medium. The advantage of adding motile microorganism is to stabilize the nanoparticle suspension generated by the combined effects of buoyancy force and magnetic field. Gyrotactic microorganisms enhanced the heat transfer, mass transfer and improve the stability of the nanofluids. The mathematical model includes the equations of conservation of mass, momentum, energy, nanoparticle concentration and microorganism equations. The governing equations have been fabricated for long wavelength and low Reynolds number approximations. The solutions have been evaluated for pressure gradient, nanoparticle concentration, temperature and motile microorganism equations are solved by using a powerful technique known as the homotopy analysis method. Effects of physical parameters like a fluid parameter, Brownian motion parameter, thermophoresis parameter, bioconvection Peclet number, Hartmann number and Grashof number are considered. Obtained results are displayed in graphs. The results reveal that bioconvection decreases the pressure gradient because convection instability takes place within the system that causes convection pattern which decreases the pressure gradient. Such result helps in biomedical sciences and engineering. Since, microorganisms are favorable in the decomposition of organic material, producing oxygen and maintaining human health.