We determine exactly the phase structure of a chiral magnet in one spatial dimension with the Dzyaloshinskii-Moriya (DM) interaction and a potential that is a function of the third component of the magnetization vector, $n_3$, with a Zeeman (linear with the coefficient $B$) term and an anisotropy (quadratic with the coefficient $A$) term. For large values of potential parameters $A$ and $B$, the system is in one of the ferromagnetic phases, whereas it is in the spiral phase for small values. In the spiral phase we find a continuum of spiral solutions, which are one-dimensionally modulated solutions with various periods. The ground state is determined as the spiral solution with the lowest average energy density. As the phase boundary approaches, the period of the lowest energy spiral solution diverges, and the spiral solutions become domain wall solutions with zero energy at the boundary. The energy of then domain wall solutions is positive in the homogeneous phase region, but is negative in the spiral phase region, signaling the instability of the homogeneous (ferromagnetic) state. The order of the phase transition between spiral and homogeneous phases and between polarized ($n_3=pm 1$) and canted ($n_3 ot=pm 1$) ferromagnetic phases is found to be second order.