The exact analytical solution for the compressible two-dimensional gas flow in the microbearing is presented. The general slip-corrected Reynolds lubrication equation is derived and it is shown that it possesses an exact analytical solution. It is obtained by a suitable transformation of the independent variable, and it provides the pressure distribution in the bearing as well as the mass flow rate through it. By neglecting the rarefaction effect, this solution is also applicable to the continuum gas flow in the bearing, which also does not exist in the open literature. The obtained analytical solution can be usefully applied for testing the other, experimental or numerical results.