We consider a five-dimensional Einstein-Chern-Simons action which is composed of a gravitational sector and a sector of matter, where the gravitational sector is given by a Chern-Simons gravity action instead of the Einstein-Hilbert action, and where the matter sector is given by a perfect fluid. The gravitational lagrangian is obtained gauging some Lie-algebras, which in turn, were obtained by S-expansion procedure of Anti-de Sitter and de Sitter algebras. On the cosmological plane, we discuss the field equations resulting from the Anti-de Sitter and de Sitter frameworks and we show analogies with four-dimensional cosmological schemes.