Single-crystal neutron diffraction is used to investigate the magnetic and structural phase diagrams of the electron-doped superconductor $\text{Ba}{({\text{Fe}}_{1\ensuremath{-}x}{\text{Co}}_{x})}_{2}{\text{As}}_{2}$. Heat-capacity and resistivity measurements have demonstrated that Co doping this system splits the combined antiferromagnetic and structural transition present in ${\text{BaFe}}_{2}{\text{As}}_{2}$ into two distinct transitions. For $x=0.025$, we find that the upper transition is between the high-temperature tetragonal and low-temperature orthorhombic structures with $({T}_{\text{TO}}=99\ifmmode\pm\else\textpm\fi{}0.5\text{ }\text{K})$ and the antiferromagnetic transition occurs at ${T}_{\text{AF}}=93\ifmmode\pm\else\textpm\fi{}0.5\text{ }\text{K}$. We find that doping rapidly suppresses the antiferromagnetism, with antiferromagnetic order disappearing at $x\ensuremath{\approx}0.055$. However, there is a region of coexistence of antiferromagnetism and signatures of superconductivity obtained from thermodynamic and transport properties. For all the compositions studied, we find two anomalies in the temperature dependence of the structural Bragg peaks from both neutron scattering and x-ray diffraction at the same temperatures where anomalies in the heat capacity and resistivity have been previously identified. Thus for $x=0.025$, where we have shown that the lower anomaly occurs at ${T}_{\text{AF}}$, we infer that there is strong coupling between the antiferromagnetism and the crystal lattice which may persist to larger $x$.