We report on the study of the noncentrosymmetric ternary carbide YbCoC2. Our magnetization, specific heat, resistivity, and neutron diffraction measurements consistently show that the system behaves as a heavy-fermion compound, displaying an amplitude-modulated magnetic structure below the Néel temperature reaching TN = 33 K under pressure. Such a large value, being the highest among the Yb-based systems, is explained in the light of our ab initio calculations, which show that the 4 f electronic states of Yb have a dual nature, i.e., due to their strong hybridization with the 3d states of Co, 4 f states expose both localized and itinerant properties.