We study the entanglement dynamics of two static atoms coupled with a bath of fluctuating scalar fields in vacuum in the cosmic string spacetime. Three different alignments of atoms, i.e. parallel, vertical, and symmetric alignments with respect to the cosmic string are considered. We focus on how entanglement degradation and generation are influenced by the cosmic string, and find that they are crucially dependent on the atom-string distance r , the interatomic separation L, and the parameter ν that characterizes the nontrivial topology of the cosmic string. For two atoms initially in a maximally entangled state, the destroyed entanglement can be revived when the atoms are aligned vertically to the string, which cannot happen in the Minkowski spacetime. When the symmetrically aligned two-atom system is initially in the antisymmetric state, the lifetime of entanglement can be significantly enhanced as ν increases. For two atoms which are initially in the excited state, when the interatomic separation is large compared to the transition wavelength, entanglement generation cannot happen in the Minkowski spacetime, while it can be achieved in the cosmic string spacetime when the position of the two atoms is appropriate with respect to the cosmic string and ν is large enough.