The effect of the magnetic field on the unsteady natural convective one-dimensional laminar flow of an incompressible viscous and slightly electrically conducting fluid over a vertical cylinder is investigated analytically. The cylinder is assumed to be embedded in a porous medium, and it moves with a uniform velocity along the vertically upward direction. The boundary layer flow equations are converted to a nondimensional form using appropriate non-dimensional parameters, and the closed-form solutions are obtained using the Laplace transform method. Fluid velocity depends on radial distance, time, magnetic parameter, Grashof number, permeability parameter, and Prandtl number. Graphical and tabulated results of the fluid velocity profile and shear stress based on the analytical solutions are presented and discussed. The analytical solution reveals that the unsteady fluid velocity tends to a steady state at a large time. The present study demonstrates that increased porosity leads to enhancement in the fluid velocity, whereas the transverse magnetic field resists the fluid velocity. Furthermore, the absolute value of shear stress decreases with a decrease in porosity of the medium or an increase in magnetic field effect.