We characterize pure lexsegment complexes which are Cohen-Macaulay in arbitrary codimension.More precisely,we prove that any lexsegment complex is Cohen-Macaulay if and only if it is pure and its 1-dimensional links are connected,and that a lexsegment flag complex is Cohen-Macaulay if and only if it is pure and connected.We show that any non-Cohen-Macaulay lexsegment complex is a Buchsbaum complex if and only if it is a pure disconnected flag complex.For t ≥ 2,a lexsegment complex is strictly Cohen-Macaulay in codimension t if and only if it is the join of a lexsegment pure disconnected flag complex with a (t-2)-dimensional simplex.When the Stanley-Reisner ideal of a pure lexsegment complex is not quadratic,the complex is Cohen-Macaulay if and only if it is Cohen-Macaulay in some codimension.Our results are based on a characterization of Cohen-Macaulay and Buchsbaum lexsegment complexes by Bonanzinga,Sorrenti and Terai.