We prove the global well-posedness of the three-dimensional primitive equations on non-flat layers for arbitrarily large initial data in the framework of maximal \(L^q\) - \(L^p\) regularity. For the proof, we first define the hydrostatic Helmholtz projection and the hydrostatic Stokes operator on non-flat layers, and we prove the maximal \(L^q\) -regularity of the corresponding hydrostatic Stokes equations. At the next step, in order to prolong the existence time of the local solution to any large \(T>0\) , we establish \(H^1L^2 \cap L^2H^2\) a priori bounds with the energy method. Our global well-posedness result includes the results of global well-posedness of the primitive equations on flat layers with the mixed boundary conditions, that is, periodicity in the horizontal direction and Dirichlet–Neumann boundary conditions in the vertical direction. Moreover, we show that the solution can be extended on \((0, \infty )\) and it decays exponentially.