The structural, magnetic, elastic, mechanical, and thermodynamic properties of BaC and BaN compounds in different phases were studied using first-principle calculations based on spin-polarized density functional theory within the generalized gradient approximation (GGA-PBEsol) and the modified Becke–Johnson approach (mBJ-GGA-PBEsol) for the exchange-correlation energy and potential. The following phases—rock-salt (NaCl), CsCl, zinc blende (ZB), NiAs- and WZ-type hexagonal, tetragonal (P4/nmm), and orthorombic (Pnma) phases of BaC and BaN compounds—were considered. We obtained that Pnma phase has the lowest energy configuration as a function of the volume for both the BaN and BaC compounds. The ferromagnetic phase is energetically favored with respect to the non-magnetic phase in the BaN and BaC compounds, except for the CsCl phase in the BaC compound. Considering the phonon dynamics of BaN and BaC compounds in the Pnma, NaCl, ZB, and WZ phases, we observed that the BaN and BaC compounds in the Pnma, NaCl, and ZB phases are dynamically stable. The calculated elastic properties for the Pnma, NaCl, and ZB phases show that they are elastically stable. The Pnma phase for the BaN and BaC compounds, which is a new phase was found to be dynamically and elastically stable. The BaN and BaC compounds exhibit half-metallic behavior in the Pnma, NaCl, and ZB phases. The half-metallic and magnetic character found in the BaN and BaC compounds are attributed to the presence of spin-polarized 2p orbitals of the nitrogen and carbon atoms, respectively. We found that BaN and BaC compounds are half-metallic ferromagnets with magnetic moment of 1 μB and 2 μB per formula unit, respectively. Using the GGA-PBEsol (mBJ-GGA-PBEsol) approach, our calculated half-metallic gaps for BaN and BaC compounds are 0.22 eV (0.54 eV) and 0.32 eV (0.44 eV) in the Pnma phase, 0.23 eV (1.32 eV) and 0.35 eV (1.00 eV) in the NaCl phase, and 0.38 eV (1.54 eV) and 0.50 eV (1.57 eV) in the ZB phase, respectively.