In this paper, we investigate the Keller–Segel system coupled with the Navier–Stokes equations in a bounded domain \(\Omega \subset \mathbb {R}^2\) as follows \(\begin{aligned} \left\{ \begin{aligned}&n_{t}+u\cdot \nabla n=\Delta n-\nabla \cdot (n\nabla c)-\kappa n^{2},\\&c_{t}+u\cdot \nabla c=\Delta c -nc,\\&v_{t}+u\cdot \nabla v=\Delta v -\gamma v+n,\\&u_{t}+(u\cdot \nabla ) u+\nabla \pi =\Delta u-nf,\\&\nabla \cdot u=0. \end{aligned} \right. \end{aligned}\) We establish the global existence of classical solutions for the initial-boundary value problem in a bounded domain under mild assumption on the initial data.