The magnetic properties of undoped and Li-doped MgCu2O3 single crystals have been studied by magnetic-susceptibility and neutron-diffraction measurements. The pure compound is a semiconductor with an antiferromagnetic ground state (T(N) = 95 K). Above T(N), short-range magnetic correlations within the Cu-O chains of the MgCu2O3 structure give rise to a predominantly one-dimensional (1D) magnetic behavior. This is revealed by the quantitative interpretation of the susceptibility measurements. Below T(N), the 3D magnetic structure, derived from neutron-diffraction experiments, can be described by an essentially collinear model. A small spin canting, however, exists, because adjacent CuO6 octahedra are strongly tilted with respect to each other. The magnetic structure can be decomposed into two independent magnetic sublattices, which, in the mean-field approximation, are not coupled. The topology is similar to the one producing an infinitely degenerate state in antiferromagnetic fcc lattices. Doping experiments with Li clearly demonstrate the importance of spin fluctuations and fluctuations of the local exchange fields for lifting the degeneracy in such a system. A remarkably small amount of Li (about 2 mole % Li) is sufficient to disturb the magnetic lattice in such a way that the almost collinear spin arrangement changes into an arrangement where the spins of one sublattice are strongly canted with respect to the spins of the other sublattice.