In this article we obtain a number of integral formulas for foliated sub-Riemannian manifolds; the main geometric object is a Riemannian manifold endowed with a distribution \(\mathcal {D}\) and a foliation \(\mathcal {G}\) such that the tangent bundle of \(\mathcal {G}\) is a subbundle of \(\mathcal {D}\) . Our integral formulas generalize some results for foliated Riemannian manifolds; they are expressed by the shape operators of \(\mathcal {G}\) with respect to normals in \(\mathcal {D}\) and by the curvature tensor of the induced connection on \(\mathcal {D}\) . The formulas also contain arbitrary functions \(f_j\) , \(0\le j<\dim \mathcal {G}\) , of scalar invariants of \(\mathcal {G}\) , and by a special choice of \(f_j\) they reduce to integral formulas obtained by means of a new transformation called the \(\eta \) -Poincaré transformation of the shape operators. We apply our integral formulas to foliated sub-Riemannian manifolds with restrictions on the curvature and on the extrinsic geometry of \(\mathcal {G}\) , and to codimension-one foliations.