Swarming bacteria are an example of a complex, active biological system, where high cell density and super-diffusive cell mobility confer survival advantages to the group as a whole. Previous studies on the dynamics of the swarm have been limited to easily observable regions at the advancing edge of the swarm where cells are restricted to a plane. In this study, using defocused epifluorescence video imaging, we have tracked the motion of fluorescently labeled individuals within the interior of a densely packed three-dimensional (3D) region of a swarm. Our analysis reveals a novel 3D architecture, where bacteria are constrained by inter-particle interactions, sandwiched between two distinct boundary conditions. We find that secreted biosurfactants keep bacteria away from the swarm-air upper boundary, and added antibiotics at the lower swarm-surface boundary lead to their migration away from this boundary. Formation of the antibiotic-avoidance zone is dependent on a functional chemotaxis signaling system, in the absence of which the swarm loses its high tolerance to the antibiotics.