We prove a splitting theorem for a smooth noncompact manifold with (possibly noncompact) boundary. We show that if a noncompact manifold of dimension $n\geq 2$ has $\lambda_1(-\alpha\Delta+\operatorname{Ric})\geq 0$ for some $\alpha<\frac{4}{n-1}$ and mean-convex boundary, then it is either isometric to $\Sigma\times \mathbb{R}_{\geq 0}$ for a closed manifold $\Sigma$ with nonnegative Ricci curvature or it has no interior ends.