Linear and nonlinear free vibrations of nonlinearly elastically constrained functionally graded porous (FGP) microbeams with rough surface are analytically studied in this paper via the modified couple stress theory. A surface roughness model of the FGP microbeams is developed. The material properties including porous property are supposed to continuously vary along the thickness direction. The higher-order nonlinear governing equation and elastic boundary conditions are derived through the Hamilton principle. A closed-form solution for linear frequency and mode shape is presented. Subsequently, an analytical solution for nonlinear frequency is achieved by employing the Galerkin procedure. Finally, the effects of surface roughness, size parameter, power-law index, porosity volume fraction, and nonlinearly elastic constraints on the linear and nonlinear vibrations of functionally graded porous microbeams are examined.