In this paper, we define the second generalized Yamabe invariant on manifolds with boundary. We prove some of its properties and study when the invariant is attained by some metric. In another direction, by using the conformal mean curvature flow, we prove a version of the conformal Schwarz lemma for manifolds with boundary.