We propose a systematic procedure to construct polynomial algebras from intermediate Casimir invariants arising from (semisimple or non-semisimple) Lie algebras . In this approach, we deal with explicit polynomials in the enveloping algebra of . We present explicit examples of low-dimensional Lie algebras (up to dimension six) to show how they can display different behaviours and can lead to abelian algebras, quadratic algebras or more complex structures involving higher order nested commutators. Within this framework, we also demonstrate how virtual copies of the Levi factor of a Levi decomposable Lie algebra can be used as a tool to construct ‘copies’ of polynomial algebras. Different schemes to obtain polynomial algebras associated to algebraic Hamiltonians have been proposed in the literature, among them the use of commutants of various type. The present approach is different and relies on the construction of intermediate Casimir invariants in the enveloping algebra .