The magnetic ground state of the Eu 2+ moments in a series of Eu(Fe1−xCox)2As2 single crystals grown from the Sn flux has been investigated in detail by neutron diffraction measurements. Combined with the results from the macroscopic properties (resistivity, magnetic susceptibility and specific heat) measurements, a phase diagram describing how the Eu magnetic order evolves with Co doping in Eu(Fe1−xCox)2As2 is established. The ground-state magnetic structure of the Eu 2+ spins is found to develop from the A-type antiferromagnetic (AFM) order in the parent compound, via the A-type canted AFM structure with some net ferromagnetic (FM) moment component along the crystallographic c direction at intermediate Co doping levels, finally to the pure FM order at relatively high Co doping levels. The ordering temperature of Eu declines linearly at first, reaches the minimum value of 16.5(2) K around x = 0.100(4), and then reverses upwards with further Co doping. The doping-induced modification of the indirect Ruderman-Kittel-Kasuya-Yosida (RKKY) interaction between the Eu 2+ moments, which is mediated by the conduction d electrons on the (Fe,Co)As layers, as well as the change of the strength of the direct interaction between the Eu 2+ and Fe 2+ moments, might be responsible for the change of the magnetic ground state and the ordering temperature of the Eu sublattice. In addition, for Eu(Fe1−xCox)2As2 single crystals with 0.10 x 0.18, strong ferromagnetism from the Eu sublattice is well developed in the superconducting state, where a spontaneous vortex state is expected to account for the compromise between the two competing phenomena.