This article is concerned with the global existence of classical solutions to an initial-boundary value problem for a coupled Keller–Segel–Stokes system in three-dimensional smooth bounded domains. The underlying model can be described as: \(\begin{aligned} \left\{ \begin{aligned}&n_t+\textbf{u}\cdot \nabla n=\Delta (\gamma (c)n)+\mu n(1-n^{\sigma }), & x\in \Omega , t>0,\\&c_t+\textbf{u}\cdot \nabla c=\Delta c-c+n^{1-\alpha }c^{\alpha }, & x\in \Omega , t>0,\\&\textbf{u}_t=\Delta \textbf{u}-\nabla P+n^{l}\nabla \phi , & x\in \Omega , t>0,\\&\nabla \cdot \textbf{u}=0, & x\in \Omega , t>0,\\ \end{aligned}\right. \end{aligned}\) where \(\sigma >0, \alpha \in (0,1),l\in (0,1) \) , \(\Omega \subset \mathbb {R}^3\) is a bounded domain with smooth boundary and \(\gamma \in C^3([0,\infty ))\) with \(\gamma (s)>0 \text{ for } \text{ all } s\ge 0\) , as well as the gravitational potential \(\phi \in W^{2,\infty }(\Omega )\) . Under the conditions: Case 1: For \(\mu >0\) and \(l\in (0,1) \) , \(\begin{aligned} \left\{ \begin{aligned}&2(1-\alpha )>\sigma +\alpha>\frac{3}{2}(1-\alpha ) ,\\&\sigma +1>\frac{5}{3}l.\\ \end{aligned}\right. \end{aligned}\) Case 2: For \(\mu =0\) , \(\begin{aligned} \alpha >\frac{1}{3} \quad \text {and}\quad \frac{2}{3}<l<1. \end{aligned}\) Under homogeneous Neumann boundary conditions, we establish the existence of global classical solutions for this Keller–Segel–Stokes system.