The Cauchy problem of the fifth-order nonlinear Schrödinger (foNLS) equation is investigated with nonzero boundary conditions in detailed. Firstly, the spectral analysis of the scattering problem is carried out. A Riemann surface and affine parameters are introduced to transform the original spectral parameter to a new spectral parameter in order to avoid the multi-valued problem. Based on Lax pair of the foNLS equation, the Jost functions are obtained, and their analytical, asymptotic, symmetric properties, as well as the corresponding properties of the scattering matrix are established systematically. For the inverse scattering problem, we discuss the cases that the scattering coefficients have simple zeros and double zeros, respectively, and we further derive their corresponding exact solutions via solving a suitable Riemann-Hilbert problem. Moreover, some interesting phenomena are found when we choose some appropriate parameters for these exact solutions, which are helpful to study the propagation behavior of these solutions.