We study the partitioning of motile bacteria in an aqueous two-phase mixture of dextran (DEX) and polyethylene glycol (PEG), which can phase separate into DEX-rich and PEG-rich phases. While nonmotile bacteria partition exclusively into the DEX-rich phase in all conditions tested, we observed that motile bacteria penetrate the soft DEX-PEG interface and partition variably among the two phases. For our model organism Bacillus subtilis, the fraction of motile bacteria in the DEX-rich phase increased from 0.58 to 1 as we increased the DEX composition within the two-phase region. We hypothesized that the chemical affinity between DEX and the bacteria cell wall acts to weakly confine the bacteria within the DEX-rich phase; however, motility can generate sufficient mechanical forces to overcome the soft confinement and propel the bacteria into the PEG-rich phase. Using optical tweezers to drag a bacterium across the DEXPEG interface, we demonstrate that the overall bacteria partitioning is determined by a competition between the interfacial forces and bacterial propulsive forces. Our measurements are supported by a theoretical model of dilute active rods embedded within a periodic soft confinement potential.