The one-dimensional (1D) metallic states that appear at the zigzag edges of semiconducting two-dimensional transition metal dichalcogenides (TMDCs) result from the intrinsic electric polarization in these materials, which for D3h symmetry is a topological invariant. These 1D states are susceptible to electronic and structural perturbations that triple the period along the edge. In this paper we study possible spin-density waves (SDWs) and charge-density waves (CDWs) at the zigzag edges of MoS2, using first-principles density-functional theory calculations. Depending on the detailed structures and termination of the edges, we observe either combined SDW/CDWs or pure CDWs, along with structural distortions. In all cases the driving force is the opening of a band gap at the edge. The analysis should hold for all group VI TMDCs with the same basic structure as MoS2.