This study investigates the unsteady Maxwell nanofluid flow past a stretching surface, embedded in a porous medium, in the presence of magnetic field and thermal radiation effects. Polydimethylsiloxane (PDMS) is considered as a Maxwell base fluid and graphene is taken as nanoparticle to form the nanofluid. It is a well‐reported fact in the literature (Boland et al. Science, 354(2016)1257) that viscous graphene polymers can be used to make sensitive electromechanical sensors, thereby setting the direction and incentive for the study of graphene–PDMS nanofluid. In this paper, we have implemented the Navier's slip boundary condition at the nanofluid‐surface interface. Entropy analysis for the energy efficiency of the system in terms of the Bejan number is carried out extensively. By employing suitable similarity transformations, the set of partial differential equations has been transformed into a set of ordinary differential equations. The transformed equations are solved by the homotopy analysis method (HAM). The nanofluid velocity, temperature, skin‐friction coefficient, and heat transfer rate are analyzed in this paper under several regulatory physical parameters. The findings show that the rise in time relaxation parameter has adverse effects on nanofluid velocity but enhances the entropy generation in the system. The heat transfer rate decreases with an enhancement of the Deborah number but increases with a rise in the nanoparticle volume fraction. The Bejan number shows increasing trend with an enhancement of unsteady parameter, nanoparticle volume fraction, and porous permeability parameter. This study bears the potential application in powder technology, plastic extrusion process, as well as in bio‐engineering.