Layered transition-metal compounds have received great attention owing to their novel physical properties. Here, we present the structural, electronic, thermal, and magnetic properties of BaMn2Sb2 and Ba2Mn3Sb2O2 single crystals, both with the layered structure analogous to high-temperature superconductors. While the Mn moment in the MnSb4 tetrahedral environment forms G-type antiferromagnetic (AFM) ordering in both BaMn2Sb2 (TN1~443 K) and Ba2Mn3Sb2O2 (TN1~314 K), a short-range AFM order is found in the intercalated MnO2 layer at a much lower temperature (TN2~60 K) in Ba2Mn3Sb2O2. The directions of the ordered moments in these two magnetic sub-lattices of Ba2Mn3Sb2O2 are perpendicular to each other, even though the system is electrically conductive. This indicates that the large magnetic moments in these compounds are highly localized, leading to negligible coupling between MnSb4 and MnO2 layers in Ba2Mn3Sb2O2. These findings provide an insight into the structure-magnetism-based design principle for new superconductors.