Elastic neutron diffraction measurements were performed on the quasi-two-dimensional heavy-fermion system $\mathrm{Ce}{\mathrm{Rh}}_{1\ensuremath{-}x}{\mathrm{Co}}_{x}{\mathrm{In}}_{5}$, ranging from an incommensurate antiferromagnet for low Co composition $x$ to an unconventional superconductor on the Co-rich end of the phase diagram. We found that the superconductivity competes with the incommensurate antiferromagnetic (AFM) order characterized by ${\mathbit{q}}_{I}=(1∕2,1∕2,\ensuremath{\delta})$ with $\ensuremath{\delta}=0.298$, while it coexists with the commensurate AFM order with ${\mathbit{q}}_{c}=(1∕2,1∕2,1∕2)$. This is in sharp contrast to the $\mathrm{Ce}{\mathrm{Rh}}_{1\ensuremath{-}x}{\mathrm{Ir}}_{x}{\mathrm{In}}_{5}$ system, where both the commensurate and incommensurate magnetic orders coexist with the superconductivity. These results reveal that particular areas on the Fermi surface nested by ${\mathbit{q}}_{I}$ play an active role in forming the superconducting state in $\mathrm{Ce}\mathrm{Co}{\mathrm{In}}_{5}$.